this post was submitted on 03 Mar 2024
        
      
      1100 points (97.8% liked)
      Programmer Humor
    27175 readers
  
      
      1766 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
- Keep content in english
 - No advertisements
 - Posts must be related to programming or programmer topics
 
        founded 2 years ago
      
      MODERATORS
      
    you are viewing a single comment's thread
view the rest of the comments
    view the rest of the comments
          
          
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.
Normal distribution curve meme makes sense here - experts and noobs can both
git pushsafely (but for different reasons)I can follow along re-typing the same commands told to me by a more senior dev just like any average monkey!
This reminds me of something I made a long time ago:
Since I am calling myself dumb, I estimate my progress to be somewhere perhaps at the 20th percentile marker? :-D One of these days I'll RTFM and rocket all the way up to be dumb enough to properly qualify for "below average"! :-P
Hold Up
You can default git to using your current branch and a specific upstream so you don't have to put anything after git push
Thanks didn't know that
Has git never told you that you should use
git push -u origin <branch>when you push a new branch for the first time?The first time you manually push like that, you can add the
-uflag (git push -u origin master) to push and set the branch's default upstream. Afterwards, a plaingit pushwhile that branch is checked out will push the branch to that default upstream. This is per-branch, so you can have amainbranch that pulls from one repository and apatchbranch that pulls and pushes to a different repository.My strategy is to just type
git pushand 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.... google the error and randomly try stack overflow answers without really understanding them.
( I have changed)