DEV Community

Discussion on: When to make a Git Commit

Collapse
 
samipietikainen profile image
Sami Pietikäinen • Edited

Personally I like to commit often and also push to remote often to backup the work. I use personal working branch in the remote so I can safely rebase and force push without interfering with others. Once the feature is ready, commits tidied up and merged to master (meant rebased with master and integrated), the personal branch can be deleted.

Collapse
 
frankkubis profile image
Frank Kubis

I recommend to use git flow. Feature branches reintegrate into develop using rebase. Its better than the personal branch way, because you can easy switch between features and work on multiple features or keep them back for later.
Push as many times as you want to feature branches, but rewrite history on rebase into develop.

Thread Thread
 
samipietikainen profile image
Sami Pietikäinen

This is exactly how I'm doing it. Personal branch == feature branch, and there can be many of them. It seems that I wrote "merged to master" when in fact I'm using rebase. Wrong choice of words, I will edit it :) Thanks.