In general, such a situation. I wrote the code I synchronized. Now, what was erased and wrote a new one. Now, if I recommit it, the previous one will be deleted. comment out is not suitable. I use the plugin for Visual Studio
1 answer
Do It
git stash That it can be read here http://stepansuvorov.com/blog/2012/11/git-stash-%D1%8D%D1%82%D0%BE-%D1%82%D0%BE-%D1%87% D1% 82% D0% BE-% D1% 8F-% D0% B8% D1% 81% D0% BA% D0% B0% D0% BB /
then create a branch and go into it.
git checkout -b NAME_BRANCH After applying the hidden changes
git stash apply Add them to the commit
git add . and make a commit.
git commit -m "custom text" After that, you can go back to the first branch and do
git merge NAME_BRANCH |