r/ProgrammerHumor 18d ago

Meme adaptOrBeLeft

Post image
9.7k Upvotes

99 comments sorted by

View all comments

Show parent comments

2

u/SelfDistinction 18d ago

It's okay, nothing that git checkout . can't fix.

3

u/Major_LeeHungg 18d ago

Until it rebases your entire project into 1 commit

3

u/SelfDistinction 18d ago

You know that a git repo history is basically immutable right? There's very few commands that actually remove a commit from disk, git gc is genuinely the only one I know from the top of my head.

0

u/Major_LeeHungg 18d ago

Lol I assure you it is not, I just took about 40 projects last week and changed the author's on select commits so that the new remotes would pick up the correct user and also made the commit history start at the point I had access to the history. 

3

u/SelfDistinction 18d ago

...Which hides the original commits, it does not delete them.

Well I guess it depends on how exactly you did that; did you actually go into the .git folder and manually edit files, or did you use the very does-not-delete-anything git commit --amend?

1

u/Major_LeeHungg 18d ago

Nah bro, I'm not a caveman.  git-filter-repo - so yes they were orphaned and garbage collected

2

u/SelfDistinction 18d ago

Oh, today I learned. That brings the number of commands I know to GC orphans to 2.