简体   繁体   English

git push将完整的分支转移到远程存储库

[英]git push complete and separate branch to remote repository

I have a Git Server... 我有一个Git服务器...

My Partner created a new branch.... 我的合作伙伴创建了一个新分支。

cd C:\profaNew\ProjectosJava
git checkout -b diana
git branch
git add .
git commit -m "Nuevo Proyecto Base"
git remote add origin git@192.168.5.200:/srv/git/project.git
git push -u origin diana

Now in my machine, I hope view her branch, But I got: 现在在我的机器上,我希望查看她的分支,但是我得到了:

C:\Migracion\project (master -> origin)
λ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

C:\Migracion\project (master -> origin)
λ git branch -r
  origin/HEAD -> origin/master
  origin/master

C:\Migracion\project (master -> origin)

How Can I get download the branch diana ? 我如何下载分支diana

Did you git fetch beforehand to get updated refs for remote branches? 您是否事先git fetch了远程分支的更新引用? If yes then the new diana branch should appear in the fetch output, and afterwards also in your git branch -a and git branch -r commands output. 如果是,则新的diana分支出现在fetch输出中,然后也出现在git branch -agit branch -r命令输出中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM