Last Sunday, and I made a bad mistake. I made a mistake and pressed right into the main branch, where I had to create a branch and instead transfer the changes to a new branch.
Therefore, I could do git revert SHAto return the last commit with a new commit.
However, what about my changes, I do not want to lose them.
Should I create a branch from an already modified master, for example git checkout -b feature, and then return the master branch?
But what happens as soon as I merge the function into master, does it recognize that this commit was returned to Master earlier and eliminate it? git merge feature
Btw, there is no problem rewriting the story, as I am the only developer working on this project. Therefore, I would consider a hard reset if its a better choice.
thanks for the advice
source
share