Ah, Shallow clones....

Yes, if your clone is too shallow you can end up with short independent islands 
of commected commits that don't rejoin the main DAG (commit graph - Directed 
Acyclic Graph).

If you clone was only one commit deep it is almost bound to be disconnected if 
the upstream has rewound their branch and gone of in a different direction 
based on an earlier commit.

If I go to (HTTPS://) gitorious.org/fg/fgdata I get to see the whole project as 
a web page, and can see it has various branches and tags, so it is a broad 
project. You can browse the upstream and compare what it has with what you 
have. e.g. 
https://gitorious.org/fg/fgdata/graph/7b8f7567dbbd0f1428ea587d88d4bfa335d95730?page=1
 

I would suggest you want a shallow clone of maybe 50-100 commits deep, or two 
or three weeks depending on busyness. That way you should have a a solid basis 
of recent commits such that you local DAG will connect with the upstream DAG 
despite rewinds.

Have a look at 
http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone 
for my early questions on this. Do note that the most recent git (I think it is 
'next') has the ability to fully support shallow clones. 

see 
http://article.gmane.org/gmane.comp.version-control.git/230878/match=shallow+clone)
 and http://article.gmane.org/gmane.comp.version-control.git/239713/
"* nd/shallow-clone (2013-12-10) 28 commits
...
 Fetching from a shallow-cloned repository used to be forbidden,
 primarily because the codepaths involved were not carefully vetted
 and we did not bother supporting such usage. This attempts to allow
 object transfer out of a shallow-cloned repository in a controlled
 way (i.e. the receiver become a shallow repository with truncated
 history).
 Will merge to 'next'.
"

Hope that helps

Philip
  ----- Original Message ----- 
  From: nmac...@iburst.co.za 
  To: git-users@googlegroups.com 
  Cc: nmac...@iburst.co.za ; Philip Oakley 
  Sent: Sunday, January 05, 2014 2:59 AM
  Subject: Re: [git-users] File in master messed up after adding someone's topic


  A couple of points:
  1) Because of bandwidth constraints at the time, I didn't do a clone, I did a 
shallow pull when I started. Not important at the time as I only do pulls.
  2) So my system is unaware of origin.
  3) The branch is master,
  4) In another folder I work with a different repository.
  5) Is git config relevant to each folder/repository, or is it system-wide?
  6) Because config is not set-up correctly, I have to use git fetch 
git://gitorious.org/fg/fgdata.

  Having attended to the above, I may then be able to do
  git fetch
  git reset --hard origin/master.

  Thanks for all the help so far. Pity about the time-zones making the 
turnaround time so long.


  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to