I have not used this in a while but here is an old function from /etc/profile.d/functions.sh on Alpine that I used to tame some unwieldy .git folders in the past. No idea if any of it has been deprecated. It's like one big monster alias. Nowadays I instead just clone a repo to a ramdisk, purge the .git folder and then rsync it to my hoarded stash of git repos.
> Nowadays I instead just clone a repo to a ramdisk, purge the .git folder and then rsync it to my hoarded stash of git repos.
You're probably already doing this, but if you do a shallow clone (git clone --depth=1 ..) you'll limit the amount that ends up in .git that you need to purge.
Even with shallow clones, I'm still surprised that it ends up with a .git that's a decent percentage of the total. I just tried it on a repo and ended up with 16% of the total size being .git. I would have guessed that it'd be much smaller than that.
Should probably say "most engineers I've worked with," but I think that's mostly a testament to the git workflows where I've worked (lots of small commits and short-lived branches).
Plus, once you pair with one person with snazzy aliases, it might make you want to make your own
LinuxBender|11 months ago
gcmeplz|11 months ago
You're probably already doing this, but if you do a shallow clone (git clone --depth=1 ..) you'll limit the amount that ends up in .git that you need to purge.
Even with shallow clones, I'm still surprised that it ends up with a .git that's a decent percentage of the total. I just tried it on a repo and ended up with 16% of the total size being .git. I would have guessed that it'd be much smaller than that.
metadat|11 months ago
Tons of aliases, but most often used are:
As TFA demonstrates, it's also possible to alias full-blown shell commands and even multiple shell (or git) commands, which is powerful.Someday I would like to give jj a real try, too.
https://github.com/jj-vcs/jj
gregjor|11 months ago
JTyQZSnP3cQGa8B|11 months ago
I don't believe that but I use https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git
gcmeplz|11 months ago
Plus, once you pair with one person with snazzy aliases, it might make you want to make your own
unknown|11 months ago
[deleted]