loading...

re: GIT Mantras you should know VIEW POST

FULL DISCUSSION
 

The merge commit isn’t useless. It helps you brings the changes in, without changing the commit hash of any single commit. This gives you possibility to undo the merge by just remove the Merge Commit.

While using rebase, and mistake was made during rebase. It is more difficult to undo and redo.

With the branch you are working on, has a lot of commits, using git pull --rebase would also trigger conflict resolve for each commit. It is quite annoying.

I would suggest keep git pull origin master, and perform one time git rebase to squash them all when ready to merge into main branch.

 

Good point! But in my experience, in most cases, I'm trying to push a single or two commits and there aren't conflicts, so the merge commit is identical to the commit(s). If the rebase is too large or full of conflicts you can simply send a git rebase --abort and do the merge instead.

Thank you for sharing!!!

code of conduct - report abuse