Hi

When pushing to master branch or any branch for the matter. Then
please do a rebase first and apply your commits on top of the latest
code.

We want the git tree to be clean and not a "merge hell".

So what I usually do is

git pull --rebase

To have all the latest code from master, and then if there is
conflicts or what, then I fix them locally, and then I push on top of
that.

Or if you work on feature branches then

git co master
git pull --rebase
git merge --no-ff mybranchname
git pull --rebase

And I also have a git squash alias I used to compact N number of
commits (not always) but its good

git squash 3 (to compact last 3 commit into 1 - editor opens and you
can edit the commit message)

squash => !f(){ git reset --soft HEAD~${1} && git commit --edit
-m"$(git log --format=%B --reverse HEAD..HEAD@{1})"; };f


Anyone got other tips?


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to