git reset - How to discard local commits in Git? -
i'd been working on something, , decided screwed...after having committed of it. tried following sequence:
git reset --hard git rebase origin git fetch git pull git checkout
at point got message
your branch ahead of 'origin/master' 2 commits.
i want discard local commits, without having wipe out local directory , redownload everything. how can accomplish that?
git reset --hard origin/master
will remove commits not in origin/master
origin
repo name , master
name of branch.
Comments
Post a Comment