+ All Categories
Home > Technology > Git Rebase - An alternative to merge

Git Rebase - An alternative to merge

Date post: 08-Apr-2017
Category:
Upload: chris-mcintyre
View: 298 times
Download: 0 times
Share this document with a friend
8
Git Rebase An Alternative to Merge Don’t fear the rebase 1st Lightning Talk EVER by: Chris McIntyre Hosted by theFirehoseProject
Transcript

Git RebaseAn Alternative to MergeDont fear the rebase

1st Lightning Talk EVER by: Chris McIntyreHosted by theFirehoseProject

Git MergePros: Non-destructiveCommits and branches remain the same

Cons:Messy commit historyEspecially when master is changed often

Git RebasePros:Clean commits Easier to follow during code review

Cons:Destructive - rewriteshistoryLoss of traceability

Helpful Resources Ashley Grant YouTube Video on rebasing - Sync and Rebasing Videoatlassian.com Great resource for more than just rebasing Merging vs Rebasing

MUST KnowsLearn git rebase interactive - it allows you to pick and choose how you want your commits Proper etiquette: Never rebase a branch that is shared. The rebase effects your commits but will mess up your collaborators branch!$git rebase --abort > This will get you out of trouble if you find yourself drowning in uncertainty .$git reflog > a reference to your recent commits. Used with git reset --hard {commit} to to revert to a previous point


Recommended