Git Tips

Tags: #til #git

25 February 2024


There are many things you learn while working on Git with different teams and this post is a compilation of all those tips, tricks and feedback I've received over the past few months. When working a project where multiple people are working from different parts of the world, these are the things I learnt:

  1. When you're creating a pull request and asked someone for review then don't force push in between because it makes it harder for the reviewer to review your pull request if you keep on force pushing in between.
  2. Make sure that your main branch don't break. Since people are going to branch off from main, we should try that the main branch doesn't break in terms of CI otherwise, all the branches that were spinned off from main will have the error and they need to rebase to main when the main gets the fix merged.
  3. Sometimes using fixup instead of squash in a rebase process is good.