Git Rebase - An alternative to merge
-
Upload
chris-mcintyre -
Category
Technology
-
view
298 -
download
0
Transcript of Git Rebase - An alternative to merge
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