I created a shared repo by:
git init --bare my_project.git
At some point, another user updated this repo with his changes (using git push
).
How could I check which files are exist now in the shared repo and what is their content ?
In a local repo, I could do just ls
and cat <some file>
, but in the shared repo there is no working directory...
You can find the files in the tree of a particular commit with
git ls-tree
, for example:... would show the files in the tree of the commit at the tip of the master branch. Then, to "cat" a particular file, you can do:
... supposing the
master
branch had a file calleddocs/README
.