LoginSignup
1
1

More than 5 years have passed since last update.

今いるブランチをクリップボードにコピーする

Posted at

コマンドはなかったので書きました
bashrcとかに以下を追記

alias gbcopy='git rev-parse --abbrev-ref HEAD | pbcopy'

読み込み

. ~/.bashrcとか

使う

$ gbcopy
$ master #paste

結構便利です。

ちなみにzshのbranch completionもすごく便利です。
https://github.com/zsh-users/zsh-completions

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