有人推了一个分行test
与git push origin test
共享仓库的共享仓库。git branch -r
如何查看遥控器test
我试过了
git checkout test
,它没有做任何事情git checkout origin/test
给给* (no branch)
有人推了一个分行test
与git push origin test
共享仓库的共享仓库。git branch -r
如何查看遥控器test
我试过了
git checkout test
,它没有做任何事情git checkout origin/test
给给* (no branch)
当前回答
获得新创建的分支
git fetch
要切换到另一个分支
git checkout BranchName
其他回答
这些答案对我毫无用处。
git checkout -b feature/branch remotes/origin/feature/branch
使用使用fetch
以拉动全部远程
git fetch --all
要列出远程分支 :
git branch -r
列出您所有的分支
git branch -l
>>outpots like-
* develop
test
master
要取出/更改分支
git checkout master
在这种情况下,你可能想要 创建本地test
正在跟踪远程test
分支 :
$ git branch test origin/test
先前版本的git
,你需要一个明确的--track
选项,但当您正在从一个远程分支进行分支分割时,这是默认值。
创建本地分支和切换到它,使用:
$ git checkout -b test origin/test
我用了那个:
git clean -fxd # removes untracked (new added plus ignored files)
git fetch
git checkout {branchname}
git reset --hard origin/{branchname} # removes staged and working directory changes
命令
git fetch --all
git checkout -b <ur_new_local_branch_name> origin/<Remote_Branch_Name>
等于
git fetch --all
时和时
git checkout -b fixes_for_dev origin/development
两者将创造latest fixes_for_dev
调自development