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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -