1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Git】コミットハッシュ(短縮形)からコミットハッシュ(フル)を得る

Posted at

git rev-parse コミットハッシュでOK。

bash
$ git rev-parse 9c3f6b9e
9c3f6b9ed6734dda6983992ccf790b8f805be690

このコマンドはハッシュの特定に失敗すると0以外を返す
従ってエイリアスや関数の引数でコミットハッシュを入力するときの1段目に置いておけばフィルタとして利用できる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?