Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改git推送的目标_Git - Fatal编程技术网

更改git推送的目标

更改git推送的目标,git,Git,我必须去远程存储库 $ git remote show repoA origin git push将更改推送到源站,如何更改推送到目的地,使其转到repoA的url?我知道我可以使用git push repoA branch,但我现在只想使用repoA master。使用下面的命令 git push repoA master 基本上是这样 git push <remote_name> <branch_name> git推送 将分支名称指定为master将完成作业

我必须去远程存储库

$ git remote show

repoA
origin
git push
将更改推送到源站,如何更改推送到目的地,使其转到repoA的url?我知道我可以使用git push repoA branch,但我现在只想使用repoA master。

使用下面的命令

git push repoA master
基本上是这样

git push <remote_name> <branch_name>
git推送

将分支名称指定为master将完成作业。

如果您现在要推送,可以运行以下命令:

git push <REMOTENAME> <BRANCHNAME> 
我知道我可以使用git push repoA分支,但我现在只想推到repoA master


master
是一个分支。
master
没有什么特别之处,只是它是由
git init

创建的初始分支的默认名称。有关以下答案以外的更多详细信息,请键入
git help push
git push <remote-name> <local-name:remote-name>
git push -u <remote name> <local name>
git branch --set-upstream-to <remote-name>
git branch -vv