git-tfs clone not getting all files?

19 views
Skip to first unread message

Lars Ruoff

unread,
Nov 8, 2021, 9:51:43 AM11/8/21
to git-tfs-dev
Hello.
(I am new to git as well as git-tfs)
I just cloned part of our TFS repo with something similar to
> git tfs clone someURL someBranch -c=someChangeset
The job finished well (overnight) with no noticeable errors.
The branch was our default TFS branch, but It did have to pull part of some other branches due to merge changesets.

> git branch -r
showed
  tfs/19.1.0
  tfs/21.0.0
  tfs/21.1.0
  tfs/6.0.0
  tfs/default

The latest snapshot of our TFS repo is some 13GB.
But the .git folder is surprisingly small. Barely 2GB.

Then i did a
> git checkout tfs/default.
And indeed, my local checkout is only a fraction of the files i would have in the latest TFS snapshot.
What am i doing wrong?

Also it shows a 'detached HEAD' state after that.

regards,
Lars R.

Matt Burke

unread,
Nov 10, 2021, 4:07:40 PM11/10/21
to git-t...@googlegroups.com
I’ll start with the easy one… if you check out something other than a local branch, Git will show that as a “detached HEAD”, which basically means you won’t be able to commit. The tfs/* branches are tracking branches, which is how Git keeps track of remote copies of your repository.

As for why the content is missing, what does “git-tfs verify” show?

Finally, the .git dir compresses your content and sometimes stores it as deltas. So it’s conceivable that it could be 1/10 of the size of a checkout if the checkout has really large text files. Off the top of my head, it’s 2x or so for most projects with a modest amount of history, but it varies a lot. 

Matt

--
You received this message because you are subscribed to the Google Groups "git-tfs-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to git-tfs-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/git-tfs-dev/c3c1621a-b3c4-4151-8744-a53145126ab3n%40googlegroups.com.

Lars Ruoff

unread,
Nov 16, 2021, 12:41:01 PM11/16/21
to git-t...@googlegroups.com
Thank you, Matt.
Ok, I didn't know about that tracking branches thing, need to learn more git.
I am currently running "git-tfs verify" and it says a lot of "Only in TFS: <path>".
Which seems to indicate my worries are warranted that files haven't been fetched properly?
How can I recover from this situation?
It is taking lots of time, the repo is some 300k files.

Reply all
Reply to author
Forward
0 new messages