2015-04-07 29 views
0

我在一个项目中添加了多个远程。 如何检查分支机构上的特定分支和推送代码。git中的特定远程列表分支

例如。

origin https://[email protected]/username/repo.git (fetch) 
origin https://[email protected]/username/repo.git (push) 
stash http://[email protected]/scm/omed/repo.git (fetch) 
stash http://[email protected]/scm/omed/repo.git (push) 

这里添加了两个遥控器。 目前我只有原始分支不存储分支。

我想列出特定远程的所有分支。

当我做git branch -a我只看到从原产

我需要上市下来藏匿远程分支指令分支。

+1

'GIT中拉藏匿'和'GIT中推藏匿'推。隐藏是不好的远程名称虽然... – Vishwanath

+1

@Vishwanath,我如何检查隐藏的分支? – KKB

+1

'git checkout -b 隐藏/ ' – Vishwanath

回答

2

此步骤如下。

1)获取远程信息。存储在这种情况下是远程名称。

git fetch stash 

2)显示的远程分支

git branch -a 

3)现在可以创建其通过远程分支跟踪像以下本地分支。

git checkout -b <branche-name> stash/<branch-name> 

4)上拉或使用远程名称

git pull stash <branch-name> 
git push stash <branch-name>