Git Init in home directory – now unable to commit changes

First, please use git rev-parse --show-toplevel to check if the output is git-practice directory. If it is, that means you are working on this repo.

Then work with the git repo in git-practice folder. You can use git add README.txt or git add . to make the new file README.txt as staged. Finally use git commit -m 'message' to commit the changes.

Leave a Comment