博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用git设置默认的Push Remote
阅读量:2510 次
发布时间:2019-05-11

本文共 972 字,大约阅读时间需要 3 分钟。

During my early days of git usage, my config allowed me to simply type git push instead of git push {origin} {branch_name} which I need to now.  Up until recently I needed to type out the long version...(I know)...which was incredibly annoying because I like using detailed branch names.

在使用git的初期,我的配置允许我直接输入git push而不是我现在需要的git push {origin} {branch_name} 。 直到最近,我仍然需要输入长版本...(我知道)...这令人讨厌,因为我喜欢使用详细的分支名称。

I'd finally had enough of the copy and paste branch name madness and decided I wanted git push to always push to my origin and the same branch name:

我终于受够了复制和粘贴分支名称的疯狂,并决定我想要git push始终将其推送到我的来源和相同的分支名称:

git config --global push.default current

There are a number of you can use but in most cases, especially when you have a GitHub workflow, current is likely the value you want to use.  Also, since we're using --global, this will be the default for all repositories!

您可以使用许多 ,但在大多数情况下,尤其是当您具有GitHub工作流程时, current可能是您要使用的值。 另外,由于我们使用的是--global ,因此这将是所有存储库的默认设置!

翻译自:

转载地址:http://wzpwd.baihongyu.com/

你可能感兴趣的文章
js添加删除行
查看>>
浏览器性能测试网址
查看>>
[MTK FP]用Python把图片资源image.rar中为.pbm后缀的文件更改为.bmp后缀的方法
查看>>
实验二
查看>>
[LeetCode]203. Remove Linked List Elements 解题小结
查看>>
测试一下
查看>>
vue base64
查看>>
【Django实战开发】案例一:创建自己的blog站点-1.安装及搭建开发环境
查看>>
Pie(二分)
查看>>
Mysql 索引优化
查看>>
09湖州二模(自选模块不等式)
查看>>
Mybatis Batch 批量操作
查看>>
Ubuntu server搭建Java web服务器
查看>>
WSGI学习系列WSME
查看>>
java读取xml配置文件和properties配置文件
查看>>
HDU 4300 Contest 1
查看>>
POJ 3311
查看>>
Button MouseEvent颜色变化
查看>>
Volist标签
查看>>
浅谈模块化
查看>>