Cannot checkout, file is unmerged
If you want to discard modifications you made to the file, you can do:
git reset first_Name.txt
git checkout first_Name.txt
status tell you what to do.
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
you probably applied a stash or something else that cause a conflict.
either add, reset, or rm.
Following is worked for me
git reset HEAD
I was getting following error
git stash
src/config.php: needs merge
src/config.php: needs merge
src/config.php: unmerge(230a02b5bf1c6eab8adce2cec8d573822d21241d)
src/config.php: unmerged (f5cc88c0fda69bf72107bcc5c2860c3e5eb978fa)
Then i ran
git reset HEAD
it worked
To remove tracked files (first_file.txt) from git:
git rm first_file.txt
And to remove untracked files, use:
rm -r explore_california