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が初めてです。先週、コードをタグにチェックアウトしました。タグ名を忘れてしまい、コードに問題があるようです。チェックアウトしたタグを知りたいです。どうすればそれを見つけることができますか?
コマンドを使用git describeして、現在のコミットに関連付けられている「最も近い」タグを見つけることができます。
git describe
git describe --tags
たとえば、サンプル リポジトリでは次のようになります。
testtag-2-g25a38be
これは、私が commitg25a38beにいることを意味します。これは、 tag を超える 2 つのcommit ですtesttag。
g25a38be
testtag