Git - 推送当前分支快捷方式

Is there a shortcut to tell Git to push the current tracking branch to origin? 是否有快捷方式告诉Git将当前跟踪分支推
摘要由CSDN通过智能技术生成

本文翻译自:Git - push current branch shortcut

Is there a shortcut to tell Git to push the current tracking branch to origin? 是否有快捷方式告诉Git将当前跟踪分支推送到原点?
Note: I know that I can change the default push behavior , but I am looking for an ad-hoc solution that does not change the default behavior. 注意:我知道我可以更改默认推送行为 ,但我正在寻找一种不会改变默认行为的临时解决方案。

For example, suppose I am on branch feature/123-sandbox-tests I would be using 例如,假设我正在使用分支feature/123-sandbox-tests

git push origin feature/123-sandbox-tests

which is tedious. 这很乏味。 I am looking for a shortcut, something like 我正在寻找一条捷径,比如说

git push origin current

where git knows that current is feature/123-sandbox-tests . git知道当前是feature/123-sandbox-tests


Edit : Starting from version 2.0, git's default behavior has changed to a more intuitive behavior, which is what I wanted to achieve. 编辑 :从版本2.0开始,git的默认行为已更改为更直观的行为,这是我想要实现的。 See

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值