LoginSignup
2
2

More than 5 years have passed since last update.

ブランチ名をコミットメッセージにしてコミットするエイリアス

Last updated at Posted at 2013-09-26
~/.gitconfig
cib = !git commit -m \"`git rev-parse --abbrev-ref HEAD | ruby -e \"print STDIN.read.strip.gsub('-', ' ').capitalize\"`\"

とかして、ブランチ名 (ブランチ名はハイフン区切り) をコミットメッセージにする。

☁  git co -b remove-foo-file-from-head
Switched to a new branch 'remove-foo-file-from-head'
☁  git cib
[remove-foo-file-from-head 8f04925] Remove foo file from head
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 b.txt

アイディアは 爆速でトピックブランチを切るGitのエイリアス から頂きました。この逆バージョン。

2
2
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
2
2