Is there a way to check the integrity of a cloned repo.

git

I have checked out a remote repo. Now I did some operations of adding some file to the repo. as well as (perhaps) removing some files in the repo. In both the instances git was not informed of the changes. Is there a way for git to check the integrity of the repo. and inform me whatever files were changed (or not) ?

I saw this post 1 but dunno if that covers the scenario I shared above. Is $git fsck enough? If I remove a file from the local repo. how would git tell/show it ?

Look forward to answers.

Best Answer

You seem to be looking for the git status command.

From man git-status

Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by git (and are not ignored by gitignore(5)). The first are what you would commit by running git commit; the second and third are what you could commit by running git add before running git commit.

Related Question