this post was submitted on 25 Nov 2023
895 points (97.2% liked)

Programmer Humor

32284 readers
835 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] fushuan@lemm.ee 37 points 11 months ago (3 children)

Slight correction. In case of fire:

Git checkout -b firemyusername Git commit -am="fire" Git push.

We don't want to have conflicts with code versions when going in on a rush, better to create a new branch. We can merge all the conflicts afterwards.

[–] reboot6675@sopuli.xyz 2 points 11 months ago (1 children)

Oh man I hadn't seen a git checkout -b in years haha since they introduced switch and restore, never looked back

[–] fushuan@lemm.ee 2 points 11 months ago

I'll admit I just press the buttons in my favourite IDE and had to look up the commands to remind myself, but yeah.

[–] flashgnash@lemm.ee 2 points 11 months ago (1 children)

Isn't that what git stash is for though?

[–] crmsnbleyd@sopuli.xyz 4 points 11 months ago (2 children)
[–] PoolloverNathan@programming.dev 1 points 11 months ago* (last edited 11 months ago)

git push origin refs/stash@{$n}:stash/$USER/$n iirc

[–] flashgnash@lemm.ee 1 points 11 months ago

Can't you? Could've sworn you could

I've done it with TFS source control at least, thought it would be possible with git

[–] marx2k@lemmy.world 1 points 11 months ago* (last edited 11 months ago) (1 children)

Gonna need some semicolons or double ampersand in there

[–] fushuan@lemm.ee 2 points 11 months ago (1 children)

Nah, what I need is doble new lines of code blocks since this is markdown and it fucked the display.

[–] malijaffri@feddit.ch 2 points 11 months ago (1 children)

Here you go:

git checkout -b firemyusername
git commit -am="fire"
git push
[–] fushuan@lemm.ee 1 points 11 months ago

I know how to do it, I was just lazy lmao.