We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面的情况我们经常遇到:
从develop分支checkout出feature-a分支,干完活之后git push origin feature.假如再次修改的话,还得再次git push origin feature.每次都要打全才能push成功。 但是,其实可以通过 --set-upstream 让remote的某个分支和本地的某个分支关联起来,这样只要git push一下,就会push到对应的远程分支了。 git branch --set-upstream my_branch origin/my_branch
但是,其实可以通过 --set-upstream 让remote的某个分支和本地的某个分支关联起来,这样只要git push一下,就会push到对应的远程分支了。
git branch --set-upstream my_branch origin/my_branch
上面那个命令太长了,老记不住,后来找到一个更简单了。 第一次push的时候:
git push -u origin my_branch
之后就可以直接push和pull了。
The text was updated successfully, but these errors were encountered:
也可以设置好 .gitconfig 里的
.gitconfig
[push] default = current
在当前分支下直接 git push 就可以了
Sorry, something went wrong.
可以直接 git push 然后 git 会提示 : git branch --set-upstream my_branch origin/my_branch 复制、黏贴、回车。。。
新版的git 移除了--set-upstream命令
fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.
git version: 2.15.2
No branches or pull requests
下面的情况我们经常遇到:
更简单地方法
上面那个命令太长了,老记不住,后来找到一个更简单了。
第一次push的时候:
之后就可以直接push和pull了。
The text was updated successfully, but these errors were encountered: