【发布时间】:2012-12-22 05:39:54
【问题描述】:
我认为下面的这个命令会检出一个远程分支名称“branch_name”并为我创建一个名为“branch_name”的本地分支。
'git checkout -b branch_name "`git remote`"/branch_name'
我的问题是
尽管我已经有一个分支名称“branch_name”,我该如何运行它,我是否可以要求 git it checkout 到 branch_name 甚至(如果该分支已经存在)?
当我执行 'git branch -a' 时,我没有看到分支 'remote/branch_name',我只看到一个分支 'remotes/ser-git/branch_name'。 git如何从'git remtoe'/branch_name中找到正确的删除分支?
【问题讨论】:
-
我建议使用 git repo 查看器提前检查分支。类似 smartgit syntevo.com/smartgit/index.html.
标签: git