$ git checkout master
$ git rebase feature/awesomesauce
State of master branch is...
#PSA
@andrioid quick quick git reset --hard @{u} *phew*
@ellotheth what does the @{u} do?
@andrioid It's a shortcut for @{upstream}, which is a shortcut for whatever the remote tracker is for the current branch. https://git-scm.com/docs/gitrevisions#gitrevisions-emltbranchnamegtupstreamemegemmasterupstreamememuem
In the sample in that tutorial, the user locally rebased "everybody else's" master branch on top of the feature. `git reset --hard @{u}` moves the user's master back to the original location.
(It wouldn't work if the user had made local commits to master and THEN rebased, or if they had force-pushed their rebase, but there are other options in those cases!)
@ellotheth Gotcha. So something similar to "git rebase origin/master --hard" ?
I love Git for the reason that you are allowed to fuck up locally, and you can save yourself from upstream unless you push.
With subversion, there was a lot of blame thrown around when people messed up common branches.
@andrioid `git reset origin/master --hard`, yes, exactly!
I agree, Git is liberating after Subversion. If you're not sure how something works or what a particular operation will do, you can go always go read the docs--ooorrrrr yolo it and see what happens without affecting anybody else!
https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing