簡體   English   中英

Git Tfs 克隆僅顯示主分支上的提交

[英]Git Tfs clone only showing the commits on the master branch

我已經使用 git-tfs 將 TFS 存儲庫克隆到我的本地計算機中。 我使用了以下命令:

git tfs clone <server URL> <repository path> <local directory> --branches=auto

當我在源代碼樹中打開存儲庫時,我只能看到直接提交到主分支的提交。 git log顯示提交歷史,但是,源樹僅顯示主分支提交。 我需要查看所有分支中提交的完整歷史記錄,但我沒有成功。

編輯:

如果我嘗試使用--branches=all ,我也會收到一些錯誤。

2021-04-19 10:46:19.9024 [Debug] git command time: [00:00:00.0468850] init
2021-04-19 10:46:19.9493 [Debug] No .gitignore file specified to commit...
2021-04-19 10:46:19.9493 [Debug] No .gitignore file specified to use...
2021-04-19 10:46:22.9008 [Debug] Looking for all branches...
2021-04-19 10:46:24.5489 [Debug] GitTfs.Core.GitTfsException: error: cloning the whole repository or too high in the repository path doesn't permit to manage branches!
   => If you want to manage branches with git-tfs, clone one of this branch instead :
PS:if your branch is not listed here, perhaps you should convert the containing folder to a branch in TFS.
   at GitTfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args) in C:\gittfs\src\GitTfs\Util\GitTfsCommandRunner.cs:line 36
   at GitTfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs) in C:\gittfs\src\GitTfs\GitTfs.cs:line 83
   at GitTfs.GitTfs.Run(IList`1 args) in C:\gittfs\src\GitTfs\GitTfs.cs:line 48
   at GitTfs.Program.Main(String[] args) in C:\gittfs\src\GitTfs\Program.cs:line 28

分支結構類似於以下內容:

  $/App/App.root/App [*]
 |
 +- $/App/App.root/backend/csv/Version-1.0
 |  |
 |  +- $/App/App.root/backend/csv/Version-1.1
 |  |
 |  +- $/App/App.root/backend/csv/Version-1.1/Fixes
 |  |
 |

當我在$/App中使用git tfs時,它只會拉取主分支中的提交。 我看不到包含所有分支及其提交的完整樹。

--branches=auto僅初始化在<local directory>中合並的分支。

如果你想要一切,你應該使用--branches=all

查看您的分支結構,正確的命令應該是

git tfs clone <server URL> $/App/App.root/App <local directory> --branches=all

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM