visual-git-guide
visual-git-guide copied to clipboard
using git reset --hard origin/feature_branch
At http://irclog.greptilian.com/sourcefu/2013-03-15 @ironcamel mentioned asking a collaborator use
git reset --hard origin/feature_branch
to make their local copy of a feature branch match what some has pushed with --force (after a rebase).
I was wondering if you would consider including this scenario at http://marklodato.github.com/visual-git-guide/index-en.html#reset
I do explain --hard
but fail to give any examples of why one would want to use it. I think this can be made into a more general request to give such examples for most cases. For example, I should also explain when git reset -p
/ git reset -- files
should be used.
Right, you do say "if --hard is given, the working directory is also updated" but I love real world examples. I'm still not sure how common...
git reset --hard origin/feature_branch
... is but @ironcamel calls it a "pretty standard workflow" (in combination with git rebase
) so maybe it would be a decent use case for your guide. Thanks for considering it! :)