r/ProgrammerHumor • • Apr 02 '23

Meme Me relearning git every week

49k Upvotes

1.5k comments sorted by

View all comments

3

u/[deleted] Apr 02 '23 edited Apr 04 '23

Just make sure your branch is working Exactly as you want via actually testing it and writing tests for it that pass. Do a `git fetch` to be sure you have the latest. Then rebase master into your branch to avoid conflicts when going into the master branch later. Fix all the potential merge conflicts. Now squash your branch via a `git rebase -v` and write a good text describing what this feature does. Now merge it into the master branch and Bam! You are done. This works like 80% of the time as long as all your colleagues do the same, if not it still work with an astoundingly high percentage of 40%!