1
I was wanting to go back to the last commit performed, and nothing works anymore, I was wondering if you can undo the git reset command
1
I was wanting to go back to the last commit performed, and nothing works anymore, I was wondering if you can undo the git reset command
2
Guys after researching a little I found a very interesting material that helped me a lot, follow the link: http://minicursogit.github.io/#/
1º Whenever there is a pertinent modification to your code, remember git commit:
Thanks to the good dad I have good practice commiting whenever a modification is made on the system, even though I had little practice with git, and I had the commit from the previous day where it was all working, save some very irrelevant modifications.
2nd undoing unwanted changes in git:
"If I regret my last alterations?"
"You can discard changes in your Working directory by returning the state of your files to the last saved in staging area."
Since it can be done from the id of your commit or from your files, examples:
good explanation, good that managed to solve alone +1
I’ll leave my +1 too, starting at Git
I see that’s an excellent answer!
Thank you guys, I really enjoyed the material
Browser other questions tagged git
You are not signed in. Login or sign up in order to post.
Dude, I think this should solve
git reset 'HEAD@{1}'
– Gustavo Forte Andreli
Take a look at this answer: https://stackoverflow.com/questions/2510276/undoing-git-reset
– Israel Merljak
I took from that same reference that @Israelmerljak commented, I tested here a lero code that I have and it worked.
– Gustavo Forte Andreli
I’ve actually tried this @Israelmerljak, but I still haven’t been able to recover
– Gabriel Becher
I was actually making an error on the packages in node_modules (npm libraries), I reentered the files, the errors disappeared and others appeared, I ran git reset, and my page can’t load the files anymore. js
– Gabriel Becher
you would recommend me to pull from the remote bitbucket repository? to thinking about deleting everything and pulling from the repository.
– Gabriel Becher