0

I downloaded llvm as a zip a while ago. It's a big repo, so I don't want to download the files again, I don't want the history either. However, I'd like to have future changes the main repo present locally with the changes I make for my own. I imagine it is possible with some rebase/merge.

I tried

git init
git remote add origin https://github.com/llvm/llvm-project.git
git fetch --depth 1 

but it costs me bandwidth again:

Enumerating objects: 426325, done.
remote: Counting objects: 100% (426325/426325), done.
remote: Compressing objects: 100% (228729/228729), done.
Receiving objects:  14% (60241/426325), 32.60 MiB | 672.00 KiB/s   
puio
  • 1,208
  • 6
  • 19

1 Answers1

1

A zip file of the files extracted from a commit is not a commit itself, and has no history.

A --depth 1 clone of a repository has one commit, but has defeated Git's ability to make what Git calls thin packs. There is no in-Git solution to this.

torek
  • 448,244
  • 59
  • 642
  • 775
  • Okay I removed the depth 1 thing. I'll accept whatever saves me bandwidth. – puio Aug 26 '20 at 20:42
  • 1
    Basically, if you're going to use Git to clone a repository, the *first* clone is painful; after that, the compression stuff usually works really well. – torek Aug 26 '20 at 20:54
  • Since I was having build errors, clone was imminent. I did a `git checkout -b old`, `git commit`, `git checkout master` and build stuff. – puio Aug 27 '20 at 05:14