2013-04-03 39 views

回答

2

這就是一個實例,其中,如果SmartGit不從GUI支持孤兒選項,你還可使用CLI(命令行界面),然後鍵入快:

git checkout --orphan newbranch 

(如在 「In git, is there a simple way of introducing an unrelated branch to a repository?」)

提交的至少一個文件(仍然通過GUI):

git add afile 
git commit -m "a first commit in orphan branch" 
# no push here, this is purely a local operation in your local repo 

然後你回到SmartGit,你的新的(孤兒)分支應該在那裏。

+0

我做了你說的 - >但不能在SmartGit中看到分支 – lakesh

+0

@lakesh我懷疑是因爲你需要在新的孤兒分支中至少做一次提交。 – VonC

+0

這個提交是通過CLI或Smartgit? – lakesh