Please use rebase... but only if you understand it!
Do not commit to your commits...
I experiment on branches... I use commits as stashes... I end up with 100s of local branches...
-
Only rebase non-shared commits.
Normally people say "dont rebase pushed branches" but what if you merged your local branch into a different branch which is pushed? them commits are already shared...
Then again.. I would rebase branch X but because branch Y was branched off X I also rebase branch Y onto the new X.
-
I even rebase pushed branches, because they are _my_ branches.
-
To those who say rebase is a "lie".. I say don't commit to your commits... do you commit each time you hit the keyboard? well that is history which _could_ be captured for the sake of useless history...
-
Before merging cleanup your branch so it is clear what the branch is doing and add in more useful commit messages (use the body of the message, not just the subject).
-
Do you end up with a load of local changes which are hard to give clear commit messages to? so you end up doing "git add ." instead? then you should be committing more often.
Do not commit to your commits...
I experiment on branches... I use commits as stashes... I end up with 100s of local branches...
-
Only rebase non-shared commits.
Normally people say "dont rebase pushed branches" but what if you merged your local branch into a different branch which is pushed? them commits are already shared...
Then again.. I would rebase branch X but because branch Y was branched off X I also rebase branch Y onto the new X.
-
I even rebase pushed branches, because they are _my_ branches.
-
To those who say rebase is a "lie".. I say don't commit to your commits... do you commit each time you hit the keyboard? well that is history which _could_ be captured for the sake of useless history...
-
Before merging cleanup your branch so it is clear what the branch is doing and add in more useful commit messages (use the body of the message, not just the subject).
-
Do you end up with a load of local changes which are hard to give clear commit messages to? so you end up doing "git add ." instead? then you should be committing more often.