this post was submitted on 25 Nov 2023
931 points (97.3% liked)

Programmer Humor

32542 readers
499 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 1 year 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.

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

Isn't that what git stash is for though?

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

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

[–] flashgnash@lemm.ee 1 points 1 year 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

[–] reboot6675@sopuli.xyz 2 points 1 year 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 1 year 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.

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

Gonna need some semicolons or double ampersand in there

[–] fushuan@lemm.ee 2 points 1 year 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 1 year ago (1 children)

Here you go:

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

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