White Space
WebLife

【Git】最新のタグ名を取得する方法

May 10, 2021
  • Git
git describe --tags --abbrev=0
  • git describe … 現在のコミットからたどり着ける、最新の annotated(注釈付き) の tag を表示する。
  • --tags … lightweight / annotated の中から最新のタグを表示する。
  • --abbrev=0 … tag の後ろにユニークな文字列が付与されるが、0 を指定すると文字列を付与しない。

今回は lightweight(軽量版)の tag も含めて検索したかったので、--tagsをつけています。

参考

https://stackoverflow.com/questions/1404796/how-to-get-the-latest-tag-name-in-current-branch-in-git

過去のコミットのファイルを削除する、コメントを修正する

May 07, 2020

git コマンドで不要ファイルを除いて zip 圧縮する

May 11, 2021

Github で push しようとすると 403 (permission denied)エラーになる

June 06, 2020

git pull した時にマージコミットが出るので git pull –rebase を使う

January 22, 2020

【Git】git pull で、cannot lock ref ‘refs/remotes/origin/***’: is at XXX but expected YYY とエラーがでる

February 02, 2023

Web サーバーに Github からデプロイする方法(既存のディレクトリを Git 管理に差し替える)

June 19, 2020
  • ← git コマンドで不要ファイルを除いて zip 圧縮する

  • 【Visual Studio Code】ターミナル起動時のパスを設定する →

  • Applications
    • Apache
    • Google Search Console
    • NGINX
    • Shopify
  • Docker
  • Git
  • Google Cloud Platform
  • Google Spread Sheet
  • Javascript
    • ESLint
    • Gatsby
    • jQuery
    • Node.js
    • Nuxt.js
    • React
    • Typescript
    • Vue
    • Webpack
  • Languages
    • CGI
    • CSS
    • HTML
    • Kotlin
    • MySQL
    • PHP
    • SQLite
  • Movable Type
  • Operating Systems
    • Android
    • CentOS
    • Mac
    • Ubuntu
    • Windows
  • Software
    • Brave
    • Clip Studio
    • Filezilla
    • Google Chrome
    • Intellij
    • Unity
    • VSCode
  • Styled-Component
  • Uncategorized
  • WordPress
  • About Me
  • Git まとめ
  • Nuxt.js まとめ
    • コンポーネントとページ
  • WordPress を構築してみよう
    • WordPress 詳細ページを作る
    • WordPress のブログトップページを作る
    • WordPress テーマの作成
  • プライバシーポリシー
  • Home
  • 【Git】最新のタグ名を取得する方法

White Space