Git alias on current branch

后端 未结 4 594
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 12:00

I\'d like to improve my current aliases, most of them work over a branch. Is there a way to refer to the current branch in a git alias so I don\'t need to pass it each time?

4条回答
  •  误落风尘
    2020-12-24 12:42

    [alias]
      po = "!git push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\""
    

提交回复
热议问题