I was trying to get back to the last committed commit, and nothing works anymore, I wanted to know if you have to undo the git reset command
I was trying to get back to the last committed commit, and nothing works anymore, I wanted to know if you have to undo the git reset command
After some research I found a very interesting material that helped me a lot, follow the link: link
1st Whenever there is a relevant change in your code, remember git commit:
Thanks to the good father I have the good practice of committing whenever a modification is made to the system, even though I have little practice with git, and I had the commit from the previous day where everything was working, except for some very irrelevant modifications. / p>
2nd undoing unwanted changes in git:
"If I regret my last changes?"
"You can discard changes in your working directory by returning the state of your files to the last saved in the staging area."
Since it can be done from the id of your commit or from your files, examples: