+1 vote
1 view
in DevOps and Agile by (30k points)

I am getting this message. No matter what I edit and try to commit, it says there is nothing to commit. Looks like git does not see my working directory and looking somewhere else.

If I run git status it outputs the same: nothing to commit (working directory clean)

If I create a new branch and edit something, then the same thing happens. This started happening when I needed to fix merge clashes. When I wanted to merge my one branch with the master branch, I had to manually fix it and I needed my files to look exactly as in that branch overwriting master branch those same files. So I added those files and it let me merge it. But then no matter what I change it shows as there is nothing to commit.

What could be done here?

1 Answer

+1 vote
by (51.2k points)

check your directory that you were currently on and verify it with the directory where you have initiated git and then try to run your commands in the directory where your repo has been initialized by git using git init.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !