[ / / / / / / / / / / / / / ] [ dir / agatha2 / arepa / fgo / kpg / polska / vichan / vor / vrgames ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.981323>>981344 [Watch Thread][Show All Posts]

Forgive me as I've been using this text box to rubber duck this problem. Since I have it here already and I don't feel this is intuitive I'll just hit New Thread.

Suppose I don't care about a git repo's history. I just want the current master because I don't want to download/store gigabyes of stuff I don't need.

Months later I still don't personally care about the project's history but if I do a simple pull I'll have all these files stashed in .git that can represent any intermediate state from my initial clone until now.

How could I go about trashing all that stuff I don't want?

Basically I kind of want to use git like rsync.

I'm using git v2.18.0 btw. So far I've come up with...


git clone --depth 1 git://repo/foo.git
#later
git fetch --depth 1
git rebase
git reflog expire --all --expire=now
git gc --aggressive --prune=now

With this I can still do a pull --unshallow if I really need to.

If there's a better way then I'd much love to hear it. Also let me know if OP sucks dicks.

https://antilamer.livejournal.com/443564.html Was a large help.

 No.981340>>981347

I think you would be better off with a git hook on the server that creates a tarball of the source, then just download/rsync/scp the tarball from the server to the client. The server would keep all the history, and you could still talk to it's GIT repo, but you don't have to worry about the client side having history.


 No.981344>>981355

>>981323 (OP)

I think you'd be better off using rsync as rsync and git as git.

I know that's the boring answer, but in all seriousness why aren't you?


 No.981347>>981355

>>981340

That loses the space efficiency of git though. The whole point of git is that it doesn't store a complete distinct set of everything for every commit, it only stores differentials and changes.


 No.981355

>>981347

True. Without more details it's hard to make a better suggestion. Pruning history on the client seems like far less work.

OP, I'm also going to suggest >>981344 and just stick with rsync. Git seems like overkill here.


 No.981390


rm -rf .git


 No.981656

Look at how portage does it, I guess.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
6 replies | 0 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / agatha2 / arepa / fgo / kpg / polska / vichan / vor / vrgames ][ watchlist ]