My git workflow
In this post, I’m going to write down my git workflow so that the next time I find myself talking/thinking about it, I’ll be able to use my blog as a reminder and visual support.
I usually follow the feature branch workflow, creating a branch per feature:
Then, I work and commit code on my local branch as often as I need
Sometimes, I also save my branch in the remote repository
When I think the feature is ready to go, I review the commits, reorder and squash some of them.
Then I open a pull request. When I get comments on the code, I add temporary commits in response to them. If these commits are fixes to previous ones, I like to use fixup
Once the merging of the branch is approved, I rebase master and fixup the temporary commits into the original ones
Finally, I merge the feature branch into master.
Ah, I’ve forgotten something! I also follow some practices to elaborate my commit messages. Here you have a post I use to refresh my memory when I need to remember the best practices for commit messages.