I created a local branch from a git repository that I am working on. I have done this many times but for some reason the branch was created and put a bunch of random junk all over my code. (like random text and arrows).
So I decided to wipe the branch and attempt to recreate it since I have never seen this before. I went to switch branches and it would not let me because “Working copy is modified.” I attempted to commit changes but it said there were none to commit.
I then went on the terminal and tried to commit, discard, delete the branch, change branches. All of these went unnoticed (either ‘nothing to commit/discard’ or ‘cannot delete/change unmodified current branch’).
I am now stuck, not being able to change branches, commit the “changes”, discard changes, or remove the branch. Any thoughts?
Do the following:
This will reset all the changes you currently have. And then will checkout the master branch to continue working on. And finally delete the branch you want to remove.