Best practices working with GIT


Sep 21, 2021

Here are some of my takeaways on working wth git:

  • Theoretically rebasing is better, but merging is fine.

  • When there are many commits in your feature branch, but there is no point of keeping those commits individually in the history, one should squash the changes, so it will be one commit in master branch.

  • Let’s aim to have everything you have been working on during the day to be merged to master in the evening.

  • Going baby-steps, a small incremental changes is better than one big pull request. It reduces the risk of merge conflicts and branch synchronization headache.

  • Another reason of having small changes – how easy it can be reviewed: big PR is very hard to review due many moving parts the reviewer needs to keep in mind. So, multiple small ones are better, if they can be merged separately and independently without breaking master.

logo   Never miss a story, subscribe to our newsletter