Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の方法で共有リポジトリを作成しました。
git init --bare my_project.git
ある時点で、別のユーザーがこのレポを自分の変更で更新しました (を使用git push)。
git push
共有リポジトリに現在存在するファイルとその内容を確認するにはどうすればよいですか?
lsローカル リポジトリでは、 andを実行できcat <some file>ましたが、共有リポジトリには作業ディレクトリがありません...
ls
cat <some file>
を使用して、特定のコミットのツリーでファイルを見つけることができます。git ls-tree次に例を示します。
git ls-tree
git ls-tree -r master
...マスターブランチの先端にあるコミットのツリーにファイルが表示されます。次に、特定のファイルを「cat」するには、次のようにします。
git show master:docs/README
...masterブランチに というファイルがあるとしますdocs/README。
master
docs/README