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

Programmer Humor

32570 readers
108 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
[–] [email protected] 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.

[–] [email protected] 2 points 1 year ago (1 children)

Isn't that what git stash is for though?

[–] [email protected] 4 points 1 year ago (2 children)
[–] [email protected] 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

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

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

[–] [email protected] 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

[–] [email protected] 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.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Gonna need some semicolons or double ampersand in there

[–] [email protected] 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.

[–] [email protected] 2 points 1 year ago (1 children)

Here you go:

git checkout -b firemyusername
git commit -am="fire"
git push
[–] [email protected] 1 points 1 year ago

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