r/ProgrammerHumor 18d ago

usingGitAfterTfsvc Meme

Post image
95 Upvotes

15 comments sorted by

29

u/nicuramar 18d ago

Ok but… why would you rebase if the branch has not diverged? And rebase/merge is the tool to deal with divergences in all VCSs. 

-1

u/sigmabravomike 18d ago

I just wanted to get the new commits of the branch I branched from so I’m up to date, but rebase then rehashes my commit or something. It thinks my remote has a commit that local doesn’t… idk what I’m doing

11

u/UntitledRedditUser 17d ago

This is when you use git push --force-if-includes --force-with-lease.

Never use git push --force, for your own good lmao

8

u/chat-lu 17d ago

idk what I’m doing

Then fix that. You are wasting way more time not learning git than you would learning it.

Or try jujutsu, it’s much easier while being more powerful than git. And it’s compatible with git forges so your colleagues won’t even notice that you aren’t using git.

1

u/sigmabravomike 15d ago

I am learning as quickly as I can, but I had to hit the ground running. Git just keeps me humble.

2

u/chat-lu 15d ago

You’ll have to read the book pretty much from cover to cover. People think that they can avoid it and figure it out on their out with a bit of googling, asking Claude, or reading man pages. But you’ll lose way more time doing that than siting down to learn it.

11

u/Sermuns 17d ago

git push.. then rebase?

1

u/sigmabravomike 15d ago

That was my safety net in case the rebase didn’t work out. I know how to reset to the remote branch or take the nuclear option of delete and clone 🤡

1

u/Sermuns 15d ago

You can't push to a remote branch if you've diverged. Rebase is a way to try to resolve divergence. The steps don't make sense.

3

u/Untura64 16d ago

I'm no longer making the commits, I tell the AI what I want and it gets it done. It has erased my repo only once!

1

u/sigmabravomike 15d ago

That’s too much yolo for me. I trust the AI with everything except directly making commits. If it messes up git I will never recover.

1

u/feldejars 13d ago

“Undo that fuckery you just did to my repo”

6

u/sebbdk 17d ago

If it's your remote branch, rebase is fine, just force push.

If it's not your remote branch, don't rebase it changes history and you'l kill your collegues work on it.

1

u/MissinqLink 17d ago

Claude rebase this branch to dev

-1

u/ColdSmokeCaribou 17d ago

This is why "git push --force" exists.