Git reset not working -
I made a commitment, pulled and mixed some changes, and then made another commit. When I first wanted to go back to the commitment, I ran the command
git reset - hard & lt; Sha hash & gt; While the "head was now a response on ", my code looks like I did before the order was run, usually before, before I What did, but it seems that something is not working properly
additional information
when I run git status It says: P> The app / assets / image / .DS_Store.orig is untracked
and I can add it.
According to GIT Rephael, I pulled the commit before making 1hash (which I consider "before merge"). One Shash hash 2 for the bridge (which was not shown git log ). When I dig hash1 and hash2, I can see the changes made by me and redefine my original code with this. Even so, it looks very strange if I try to do git reset on any of these, then I can not get my code before I merge.
I'm sure the sha1 value placed in 'GIT reset - hard' is HEAD if you head If you want to reset the first comma, you should run the command like this:
git reset - hard & lt; The sha1 value of the first comma & gt; or: reset git - hard & lt; HEAD ~ 1> This site helps you to know how 'git reset' works:
Comments
Post a Comment