Git Tips
25 February, 2024 - Tags: til, git
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:
- 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.
- 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.
- Sometimes using
fixup
instead ofsquash
in a rebase process is good.