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
当我在源代码树中打开存储库时,我只能看到直接对 master 分支进行的提交。 git log
正在显示提交历史,但是,Source Tree 仅显示 master 分支提交。我需要查看所有分支中提交的完整历史记录,但我一直没有成功。
编辑:
如果我尝试使用 --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
时,它只会提取在 master 分支中所做的提交。我看不到包含所有分支及其提交的完整树。
--branches=auto
仅初始化在 <local directory>
.
中合并的分支
如果你想要一切,你应该使用--branches=all
看你的分支结构,正确的命令应该是
git tfs clone <server URL> $/App/App.root/App <local directory> --branches=all
我已经使用 git-tfs 将 TFS 存储库克隆到我的本地计算机中。我使用了以下命令:
git tfs clone <server URL> <repository path> <local directory> --branches=auto
当我在源代码树中打开存储库时,我只能看到直接对 master 分支进行的提交。 git log
正在显示提交历史,但是,Source Tree 仅显示 master 分支提交。我需要查看所有分支中提交的完整历史记录,但我一直没有成功。
编辑:
如果我尝试使用 --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
时,它只会提取在 master 分支中所做的提交。我看不到包含所有分支及其提交的完整树。
--branches=auto
仅初始化在 <local directory>
.
如果你想要一切,你应该使用--branches=all
看你的分支结构,正确的命令应该是
git tfs clone <server URL> $/App/App.root/App <local directory> --branches=all