Whenever I am trying to run:
git checkout main
I am getting an error:
error: The following untracked working tree files would be overwritten by checkout:
README.md
Please move or remove them before you switch branches.
Aborting
I have tried doing the following steps:
-
git rm --cached README.md git checkout main
Didn't work.
-
git add -all git commit -m "initial commit" git checkout main
Still the same output.