941
In case of fire (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] fushuan@lemm.ee 37 points 10 months ago

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 10 months ago

Isn't that what git stash is for though?

[-] crmsnbleyd@sopuli.xyz 4 points 10 months ago
[-] flashgnash@lemm.ee 1 points 10 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

[-] PoolloverNathan@programming.dev 1 points 10 months ago* (last edited 10 months ago)

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

[-] reboot6675@sopuli.xyz 2 points 10 months ago

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 10 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.

[-] marx2k@lemmy.world 1 points 10 months ago* (last edited 10 months ago)

Gonna need some semicolons or double ampersand in there

[-] fushuan@lemm.ee 2 points 10 months ago

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 10 months ago

Here you go:

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

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

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

Programmer Humor

32181 readers
814 users here now

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

Rules:

founded 5 years ago
MODERATORS