Git relative revision numbers

前端 未结 4 1658
余生分开走
余生分开走 2020-12-08 08:00

Is it possible (somehow) to have in Git (local) relative revision (commit) numbers, like in Mercurial 0, 1, 2, 3, ... instead of short hashes?

4条回答
  •  伪装坚强ぢ
    2020-12-08 08:34

    You can always refer to a commit by using a prefix of its SHA-1 hash, as long as it is unique. E.g., if you want to checkout 980e3ccdaac54a0d4de358f3fe5d718027d96aae, you can use git checkout 980e as long as no other commits start with 980e.

提交回复
热议问题