2012-07-31 106 views

回答

1

push命令的语法:

git push [ <options> ] <repository> [ <refspec> ] 

在最简单的情况下,<options>是空的,<repository>通常origin,并<refspec>是您当前的名字分支:

git push origin branch_name 

这假设您已创建一个名为origin的远程,eith通过克隆远程存储库或使用git remote add ...命令。如果你还没有远程配置,可以替代像这样在命令行上的网址:

git push https://username:[email protected]/p/project-name/ branch_name 
2

有效的名称通常情况下,你不需要指定推送目标的完整URL,因为远程origin已指向该目标(对于列表,请键入git remote -v)。因此,也许你需要的是:

git push origin branch_name 
0

推动当地的分行,新的远程服务器上:

混帐推起源local_branch_name:remote_branch_name_that_will_be_created