this post was submitted on 21 Mar 2025
761 points (100.0% liked)

Programmer Humor

21875 readers
664 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 4 days ago* (last edited 4 days ago) (11 children)

Tbf you have to do that for the first push, if a Readme file was autogenerated

[–] [email protected] 10 points 4 days ago (8 children)

You don't if you just clone the repo you created.

[–] [email protected] 2 points 4 days ago (7 children)

Huh? I'm talking about existing code being in a dir, then initting a git repo there, creating a pendant on your hoster of choice and then pushing it there. Wouldn't cloning the repo from step 3 to the code from step 1 overwrite the contents there?

[–] [email protected] 3 points 4 days ago

Yeah, I was thinking of a new repo with no existing code.

In your case you'd want to uncheck the creation of a readme so the hosted repo is empty and can be pushed to without having to overwrite (force) anything.

load more comments (6 replies)
load more comments (6 replies)
load more comments (8 replies)