Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> given how cloning a remote repo only gives you a partial copy of the remote history

When you clone you get the full remote history and all remote branches (by default). That’s painfully true when you have a repo with large binary blobs (and the reason git-lfs and others exist).



You're right, I got that part wrong, git actually fetches all of the remote commits (but not all of the refs, many things are missing, for instance notes).

But a clone of your clone is not going to work the same way, since remote branches are not cloned by default, either. So it'll only have partial history. This is what I was thinking about.


Notes aren't refs.


Yes they are, they get put in /refs/notes?

    git fetch origin refs/notes/*:refs/notes/*
is the command you have to run to actually clone remote refs if you're making a working-copy clone?


You're right. Thank you for the correction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: