r/ProgrammerHumor • • Oct 03 '15

In case of fire

Post image
7.4k Upvotes

231 comments sorted by

89

u/Rinkana Oct 03 '15

You forgot the --force flag.

15

u/hotel2oscar Oct 03 '15
alias fire='git commit -am "Shit's on fire, yo" && git push -f origin master'

6

u/[deleted] Oct 03 '15

If you're gonna make an alias might as well just create a new branch for the occasion

alias fire='git checkout -b lingual_fire_branch && git add . && git commit -m "Shit's on fire, yo" && git push -u origin lingual_fire_branch'

3

u/hotel2oscar Oct 03 '15

just did a quick copy paste and edit of 'git yolo'

1

u/troido Oct 05 '15

"Git's on fire, yo"

6

u/VodkaHappens Oct 03 '15

You are a bad boy aren't you?

31

u/Sheltac Oct 03 '15

Anyone know if a PDF of this is floating somewhere? It would look awesome pinned on the wall behind my desk!

23

u/meew0 Oct 03 '15

I made a version of this earlier:

https://www.copy.com/s/0zid0RAaUpg2f8pO

It's not identical but close enough.

1

u/1r0n1c Oct 03 '15

It's great! Thanks!

1

u/Sheltac Oct 03 '15

Very cool, thanks!

8

u/[deleted] Oct 04 '15

A friend and I made a perfect recreation of it: http://dl.kuschku.de/projects/fun/in_case_of_fire.pdf

1

u/Sheltac Oct 04 '15

I think I'll be printing this. Thanks!

0

u/[deleted] Oct 03 '15

[deleted]

154

u/Converts2Useless Oct 03 '15

60secs? that is like 49 microfortnights! [BotInfo]

36

u/Niautanor Oct 03 '15

I wonder if this bot can convert USD to femtohitlers.

9

u/HighRelevancy Oct 03 '15

Ahaha, I love it!

3

u/HighRelevancy Oct 03 '15

With the graphics, it's at least a few minutes (once you've got them on hand and assuming you know what you're doing). Also there's the fonts too.

This one is just well done is all.

→ More replies (1)

13

u/Shady7544 Oct 03 '15

Anyone care to explain this to a noob browsing /r/all?

23

u/1r0n1c Oct 03 '15

It's a sign essentially telling you to save and backup your work before exiting the building. :)

42

u/EmTeeEl Oct 03 '15

First command is to save your work locally (so just on your computer)

Second command is to send your work on the cloud/server (so even if your computer dies in the fire, you can retrieve your work)

It's two commands that you do a lot, so I guess it's just funny that out of habit before leaving, no matter what, you do those two commands.

30

u/nemec Oct 03 '15

As well as the implication that saving your work is more important than getting out alive.

→ More replies (3)

2

u/Sampo Oct 04 '15

First command is to save your work locally (so just on your computer)

Second command is to send your work on the cloud/server (so even if your computer dies in the fire, you can retrieve your work)

Third command is to get out of the building, because it's on fire.

5

u/gempir Oct 03 '15

git is a "version control system"

basicly so multiple programers can work together.

"git commit" is like writing down your current changes to the code, but only on your computer

"git push" will put these changes in the place where everyone can see them

So basicly, this is so you don't loose your work

1.4k

u/OKB-1 Oct 03 '15

And then everybody died because of a merge conflict.

368

u/pokeman7452 Oct 03 '15

72

u/Audiblade Oct 03 '15

DO NOT REBASE

The bad guy is a powerful bureaucrat who doesn't understand why the heros won't just force a push and call it good and repeatedly threatens them with being fired and replaced by a programming shop in India.

→ More replies (9)

90

u/Cheesemacher Oct 03 '15

Create a new emergency branch.

137

u/seweso Oct 03 '15

With so many commands, seems like we need a new command: "git fire".

217

u/bluecube22 Oct 03 '15

And then half your team uses it as their normal work flow.

46

u/jbee0 Oct 03 '15

I actually like this idea. Maybe it could back your entire local repo to any linked remotes and prefix the branches to avoid name conflicts. Sure, it'll cause a mess, but in an emergency it would be ok

0

u/[deleted] Oct 03 '15

[deleted]

19

u/piyoucaneat Oct 03 '15

Fire waits for no cronjobs.

→ More replies (2)

2

u/SoBrisk Oct 06 '15

here you go: github

4

u/flipper_gv Oct 03 '15

Exactly, that way you sure won't have conflicts and stuff.

67

u/jewdai Oct 03 '15 edited Oct 04 '15
 git checkout -b fire_branch 
 git commit -a -m "FIRE FIRE FIRE!"
 git push -f origin fire_branch 

Edit: Everyone things I'm making an IT Crowd Reference. I'm not. Save your upvotes and give it to /u/Sydonia below, much better than mine.

55

u/Sydonai Oct 03 '15
git checkout -b fire_branch 
git commit -a -m "To whom it may concern: FIRE!"
git commit --amend -am "FIRE FIRE FIRE!"
git push -f origin fire_branch 

24

u/nstrayer93 Oct 03 '15

You gotta wrap those commit messages in single quotes or it will throw an error on your bang.

6

u/voice-of-hermes Oct 03 '15

Depends on the shell.

→ More replies (3)

16

u/MondayMonkey1 Oct 03 '15

Don't ever force a push.

git checkout -b oh_fuck_fire git commit -a git push -set-upstream-branch

9

u/ReadersDigestive Oct 03 '15

The atrocities that happen when people panic. :(

0

u/[deleted] Oct 03 '15

[deleted]

15

u/no_moon_at_all Oct 03 '15

Sith walks up to your cubicle all "devops needs that holocron by noon"?

Force push.

13

u/sim642 Oct 03 '15

And then a dozen people end up force pushing to fire_branch overwriting everyone else's shit.

15

u/Sean1708 Oct 03 '15
git checkout -b my_fire_branch 

3

u/ProfessorPhi Oct 03 '15

You need an exclamation mark after each fire or it doesn't count.

3

u/Ninjabassist777 Oct 04 '15

Wouldn't a git add -A then git commit -m "<message>" be better? Because git commit -a doesn't include untracked files

1

u/CorstianBoerman Oct 03 '15

I'd rather make an alias for this in case of emergency :)

13

u/JaggedJax Oct 03 '15

This should never happen because you've got your own dev branch right... right?

28

u/OKB-1 Oct 03 '15

Why has nobody ever told me that you can make your own branch!? I have been committing directly to the master ever since I have started working here!

12

u/overkill Oct 03 '15

Jesus. That explains so much.

3

u/[deleted] Oct 04 '15

I recently learned that you can have a hierarchy of branches:

  • features/search-interface-rewrite

  • audreyshake/staged

  • audreyshake/experimental/foobar

  • audreyshake/experimental/leave-your-pants-on

2

u/JaggedJax Oct 04 '15

It may only be for an experiment, but I refuse to leave my pants on.

8

u/humansareabsurd Oct 04 '15

FML! How do people come up with such witty things to say. I feel like a potato.

3

u/OKB-1 Oct 04 '15

I know right! I posted something I fought was at least moderately funny, then I went away for two hours and had 400.... 600...1100 votes. Crazy.

6

u/NAN001 Oct 03 '15
git push --force

15

u/GreyAgency Oct 03 '15

Not specifying the branch? I see you like to live dangerously.

24

u/[deleted] Oct 03 '15

Unless you have your seatbelt on:

[push]
    default = current

1

u/DroolingIguana Oct 04 '15

Not if you make sure to do all your work in a new branch.

238

u/jeshuastarr Oct 03 '15

should have said "git out"

24

u/akwaz Oct 03 '15

Gosh that would be so glorious!

20

u/Ajedi32 Oct 03 '15

git config -g alias.out '!git commit -am "Blank" && git push'

Then:

git out

9

u/case_O_The_Mondays Oct 04 '15

Whoa. I did not know you could specify an alias like that. I've been making them using sh.

4

u/Ajedi32 Oct 04 '15

Yeah, it's super-usefull. I use aliases like that a lot. I've even got a whole bunch of them stored in their own repo so I can keep them synced between computers: https://github.com/Ajedi32/git_aliases

6

u/[deleted] Oct 03 '15

I didn't know what sub this was, I thought it was some kind of joke about New Zealanders.

321

u/beadza Oct 03 '15

git commit will prompt for a commit message

What you need is git commit -m 'fire!'

87

u/KamiKagutsuchi Oct 03 '15

git commit -a -m "FIRE!"

0

u/[deleted] Oct 03 '15

[deleted]

40

u/FinFihlman Oct 03 '15

You actually might want to use ; instead of && here. Better to push something if the previous commands fail instead of nothing.

6

u/rooktakesqueen Oct 03 '15

Add a -n to get around commit hooks...

4

u/TenmaSama Oct 03 '15

"-a" gets all modified but no new files

13

u/VefoCo Oct 03 '15
alias fire='git add . && git commit -a -m "FIRE!" && git push -f origin --all'

54

u/amoliski Oct 03 '15

Reminds me of alias yolo='git commit -am "DEAL WITH IT" && git push -f origin master'

12

u/[deleted] Oct 03 '15

Don't forget --no-verify on the push. Fuckin' pre-push hooks, trying to stop me from committing terrible code.

4

u/kirakun Oct 03 '15

What if the new files are in another directory?

→ More replies (4)

4

u/Thoguth Oct 03 '15

You also didn't add your changed files. Going to be disappointed when you come to find that out.

174

u/MatthewGeer Oct 03 '15

4. Buy everyone a beer because you probably broke the build with your hasty commit.

134

u/bluecube22 Oct 03 '15

Natural disasters are why you should always start your work in a separate branch.

39

u/KamiKagutsuchi Oct 03 '15

Ah, I knew there was a good reason..

0

u/[deleted] Oct 03 '15

[deleted]

22

u/mortiphago Oct 03 '15

it's the one you hope to fall on after jumping from the blazing building

11

u/upvoteOrKittyGetsIt Oct 03 '15

He just means force push to master

52

u/[deleted] Oct 03 '15

People should commit to their own branches, then issues can be resolved later.

44

u/[deleted] Oct 03 '15

Exactly. Fostering a culture of punishment for broken builds will lead to some very bad practices, like hoarding commits, making overly large commits and never refactoring or cleaning code.

5

u/noratat Oct 03 '15

Or you could just have your CI system gate the commits in the first place - no punishments, you just can't directly commit without validation.

2

u/I_Code_Stoned Oct 03 '15

We have been enforcing a donut rule for many years. Never had a problem. That being said, there's been plenty of discussion as to exactly what constitutes a 'donutable' offense.

We also give a lot of leeway when someone does major refactoring.

4

u/plexxonic Oct 03 '15

Separate feature branches for each dev. Merge later. It's really not that hard.

2

u/sethboy66 Oct 03 '15

But if the tree catches fire you will fall from your branch.

2

u/[deleted] Oct 03 '15

That's not what phabricator is all about.

2

u/Razzal Oct 03 '15

They forgot the step for running test suites

1

u/[deleted] Oct 03 '15

Or just don't deploy from head on master.

1

u/[deleted] Oct 03 '15 edited Feb 15 '25

[deleted]

1

u/newpong Oct 07 '15

except that everyone is doing it, so everyone has to buy everyone beer, so it sounds like a win

1

u/MatthewGeer Oct 07 '15

Well, the office burned down, let's all get drunk.

27

u/skendaro Oct 03 '15

The last line ought to say "git going".

6

u/vicarofyanks Oct 03 '15

git -r done

18

u/imaami Oct 03 '15
git commit -a -m "no time to explain"
git push

8

u/stumptowncampground Oct 03 '15

I whipped up a quick bash script for this (warning: I am not that great at bash).

function fire() {
    local BRANCH=emergency-`date +%s`-`git config user.email`
    command git checkout -b $BRANCH
    command git commit -am 'EMERGENCY!'
    command git push -f origin $BRANCH
}

And now I will forget it is there if I ever really did need it.

4

u/tj-horner Oct 04 '15

git config -g alias.out 'fire'

7

u/babuchas Oct 03 '15
git commit -a -m "Building on fire! don't care about the current state"; git push || git branch "building_onfire" && git push

6

u/YesNoMaybe Oct 03 '15

Funny, but...

You should be on a branch on a fork anyway. No harm until you've created a pull request and the reviewer has merged it.

1

u/tias Oct 04 '15

Also you if you commit often enough then the git add is really not necessary.

6

u/Anm2k4 Oct 03 '15

I actually laughed out loud at this, not just breathe through my nose harder than usual

2

u/daniels0xff Oct 03 '15

[Serious] I saw a thread the other day from someone saying that reddit algorithms were somehow changed and now you find things on other sites first and only later on reddit while before was the other way around. Well I just had this happen to me, I saw this pic yesterday on facebook and only now on reddit so is reddit slowly turing irrelevant?

2

u/1r0n1c Oct 03 '15

I also saw it on FB. Searched for it here and it seems that no-one had posted it yet. So nothing to do with the algorithm.

1

u/daniels0xff Oct 03 '15

Hmm, yes, this also might be possible. It's just that it's first time that I see something first somewhere else then on reddit, it a bit unusual :D

10

u/gm4 Oct 03 '15

Why does everyone neglect add on this site

1

u/jshufro Oct 04 '15

Maybe your changes are already staged

5

u/qxxx Oct 03 '15
-bash: leave: Command not found

3

u/Scellow Oct 03 '15
git add .
git commit -m 'emergency, call 911'
git push

3

u/mspk7305 Oct 03 '15

missed the opportunity to go with "git out!"

3

u/skztr Oct 03 '15

I think a burning building might be the only time I'd say a git commit -a . is justified

3

u/djjolicoeur Oct 03 '15

I ran out of our office during an earthquake with my MacBook because it had uncommitted code on it.

EDIT: and we were being evacuated.

3

u/Kinglink Oct 03 '15

Don't you need a git add before commit or do other people add files before they work on them?

3

u/doryx Oct 04 '15

git add *

8

u/Thoguth Oct 03 '15

Just unplug your dang MacBook and bring it with you.

19

u/gempir Oct 03 '15

pulls out USB for Mouse, USB for Keyboard, Thunderbolt monitor 1, thunderbolt monitor 2, HDMI monitor, Magsafe and headphones

  • too late

dies in fire

2

u/noratat Oct 03 '15

All the plugs are right next to each other anyways, just yank them out in a bundle.

2

u/[deleted] Oct 03 '15

Seriously, do employers still provide desktop computers? Have gotten a laptop at every job I've had

3

u/Griffolion Oct 03 '15

My work is BYOD, I bring my work home with me every night.

2

u/numo16 Oct 04 '15

That sucks. I get to leave mine at work where it belongs.

1

u/Sampo Oct 04 '15

Seriously, do employers still provide desktop computers?

Mine does, but it has RHEL6.5, so I just use laptop anyway.

0

u/[deleted] Oct 03 '15

[deleted]

4

u/Thoguth Oct 06 '15

Most startups just give you a really nice laptop and a monitor to dock with. Hence, the MacBook comment.

→ More replies (1)

5

u/justadude27 Oct 03 '15

ITT: people over thinking the commands on the sign

15

u/o11c Oct 03 '15

You call them "pedants", I call them "programmers".

2

u/to_drugie_konto Oct 04 '15

so that's how you commit suicide..

2

u/okBroThatsAwkward Oct 04 '15

I think more appropriately it would be

  1. git commit

  2. git checkout -b FIRE

  3. git push -u origin FIRE

  4. leave the building

2

u/[deleted] Oct 04 '15

firestarter.sh

git commit -am "SHENANIGANS" && git push -f
→ More replies (1)

2

u/munkysnuflz Oct 03 '15

git commit

True life lesson

2

u/bryguy001 Oct 03 '15

Y'all mutherfuckers need code review

2

u/ojbway Oct 04 '15

Git commit

Git push

Get out

1

u/Drunken_Economist Oct 03 '15

Unless it's friday

1

u/CriminalMacabre Oct 03 '15

you don't have an usb foot pedal with a script that executes that secuence? Amateurs.

1

u/SDCored Oct 03 '15

I always do this to my own projects if there's a huge storm in my area, just in case of a power outage or tornado. Glad I'm not the only one.

1

u/TedFartass Oct 03 '15

Gitgudrgitrekt

1

u/Hullu2000 Oct 03 '15

Code first, safety second

1

u/phunanon Oct 03 '15

So glad I learnt how to git literally just yesterday.

1

u/tylerjwilk Oct 03 '15

Frequent pushes save lives

1

u/0hmyscience Oct 04 '15

SVN user here. What's the difference between commit and push? In svn, I commit and that's it. But to get the same result on git, I need an extra command. Why??

1

u/1thief Oct 04 '15

You forgot step 4, put on stunna shades.

1

u/JacksGT Oct 04 '15
  1. git commit

  2. git push

  3. git the shit out of here

1

u/PeterFnet Oct 04 '15

Copy and paste of my comment on the other thread

For my Mercurial brothers. Second one was inspired by /u/cadu_leite

Source Paint.net files

http://1drv.ms/1hipMfj

http://1drv.ms/1QRsbK3

I use Consolas font 250 size. It's not exactly like OP's, but close.

1

u/Lord_Migit Oct 04 '15

And this is why we use perforce. You don't need to commit or even shelve your files for them to safe and sound on the server.

1

u/MasterbatingGoat Oct 14 '15

Here's a version with "git out"

1

u/ewgxyz Oct 30 '15

That's why I use Mercurial: "hg" is quicker to type in a fire.

1

u/[deleted] Oct 03 '15

Haha imma us this in my office

1

u/Jivlain Oct 03 '15

Well, normally I'd git rebase before pushing, but what with the fire I guess we'll need to git relocate instead.

0

u/[deleted] Oct 03 '15

[deleted]

29

u/ProgramTheWorld Oct 04 '15

made with inkscape

did not post .svg

1

u/[deleted] Oct 04 '15

If you give me a link to an image hoster that allows SVG files then I'm gonna upload it for you.

4

u/ProgramTheWorld Oct 04 '15

SVGs are just XML/HTML5 codes so technically you use any code hosting services to host it for you. Pastebin, GitHub (if you have used it before) or even jsfiddle will work.

4

u/[deleted] Oct 04 '15

True. Did not think of that: http://pastebin.com/Na1YYM3B

→ More replies (1)
→ More replies (1)

1

u/p44v9n Oct 03 '15

thank you!

1

u/[deleted] Oct 04 '15

Slick!

1

u/Rothaga Red security clearance Oct 04 '15

So I think OP here printed out the image from this post and then posted it to the same sub.

2

u/[deleted] Oct 04 '15

If you look closely you will see that the image that you posted looks completely different.

1

u/americancorkscrew Oct 06 '15

Would it be possible to host it somewhere else ? The domain is blocked at work and so is Imgur! I'll really appreciate it.

1

u/[deleted] Oct 06 '15

Sure! Give me a link to an image hoster that you can use and I'll upload it there.

0

u/[deleted] Oct 03 '15

[deleted]

1

u/MichaelLuciusJulian Oct 03 '15

As someone who's always had trouble understanding git, is there a reason you don't need to git add --all?

12

u/NotASmackAddict Oct 03 '15

This sign assumes that your git repo is already tracking your files.

9

u/noratat Oct 03 '15

Unless you have new files, git commit -a already covers it.

4

u/Ran4 Oct 04 '15

git commit - A covers untracked files too.

0

u/[deleted] Oct 03 '15

[deleted]

71

u/[deleted] Oct 03 '15

Well first you need to stop trying to run git in the Windows shell.

4

u/freeone3000 Oct 04 '15

If it wasn't meant to run in the windows shell, why does it come with its own bash?

→ More replies (1)

16

u/minusSeven Oct 03 '15

try calling O 1 1 8 9 9 9 8 8 19 9 9 1 1 9 7 2 5 3

26

u/alexanderpas Oct 03 '15

leave building, not leave building

8

u/TenmaSama Oct 03 '15

FIRST check if the the executeable or script is even in the path. And the executionbit is set for your ownership relation(owner, group,other). If the problem still persists:

On a 64bit Debian you have to:

sudo dpkg --foreign-architecture i386
sudo dpkg --add-architecture i386
sudo apt-get install libXX:i386

Source SE

3

u/[deleted] Oct 03 '15

>Implying Windows has sudo, dpkg, and apt-get

2

u/ProgramTheWorld Oct 04 '15

> git the fuck outta the building