Git alias on current branch

后端 未结 4 565
没有蜡笔的小新
没有蜡笔的小新 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:46

    This answer will be valid starting from Git 2.0, where the default push behaviour will be simple

    Unless push.default setting is set to matching, git push without specifying argument will always push the current branch, so in this case you don't need to specify it.

提交回复
热议问题