1096
you are viewing a single comment's thread
view the rest of the comments
[-] cyborganism@lemmy.ca 16 points 2 years ago

Just set your default behavior.

[-] OpenStars@startrek.website 25 points 2 years ago

I have only ever used simply "git push". I feel like this is a "how to say that you barely know how to use git without saying that you barely know how to use git" moment:-D.

[-] sag@lemm.ee 6 points 2 years ago
[-] PoolloverNathan@programming.dev 16 points 2 years ago

The first time you manually push like that, you can add the -u flag (git push -u origin master) to push and set the branch's default upstream. Afterwards, a plain git push while that branch is checked out will push the branch to that default upstream. This is per-branch, so you can have a main branch that pulls from one repository and a patch branch that pulls and pushes to a different repository.

[-] blind3rdeye@lemm.ee 6 points 2 years ago

My strategy is to just type git push and get some kind of error message about upstream not being set or something. That's a signal for me to take a second to think about what I'm actually doing and type the correct command.

[-] embed_me@programming.dev 1 points 2 years ago

That's a signal for me to

... google the error and randomly try stack overflow answers without really understanding them.

( I have changed)

load more comments (4 replies)
load more comments (6 replies)
load more comments (6 replies)
this post was submitted on 03 Mar 2024
1096 points (97.8% liked)

Programmer Humor

34344 readers
797 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 3 years ago
MODERATORS