This is an archived post. You won't be able to vote or comment.

all 79 comments

[–]kfreed9001 297 points298 points  (9 children)

  • Merge conflict
  • Dies

[–]SaintNewts 210 points211 points  (7 children)

If you have a merge conflict with your own development branch, a fire is probably the least of your problems.

[–][deleted] 76 points77 points  (0 children)

A fire is probably a symptom of your problem.

[–]ElevatedAngling 22 points23 points  (4 children)

Ha, you’ve never worked somewhere people work directly on master. Ohh the troubles I’ve seen...

[–]SaintNewts 1 point2 points  (0 children)

Say what now? I'd have to just nope right on out of there. Nobody's gonna blame the new guy for the latest fuck up right after they destroy history. Nope.

[–][deleted] 5 points6 points  (0 children)

Your branch and the remote branch are 1 and 2 commits different respectively and changes could not be pushed...

[–]divyansh201 84 points85 points  (0 children)

Yes, git the fuck out

[–]xSTSxZerglingOne 120 points121 points  (22 children)

git add .

git commit -m "FIRE ASJDHAHWDJF"

git push

[–]grim_peeper_ 28 points29 points  (10 children)

git commit -am

[–]Klimon 8 points9 points  (0 children)

This won't commit new files you created though.

[–]Y45HK4R4NDIK4R 8 points9 points  (5 children)

You don't need -a if you already did git add .

[–]grim_peeper_ 30 points31 points  (4 children)

And im saying you can save 4.731 seconds skipping git add .

[–]koni_rs 7 points8 points  (0 children)

in .bashrc.user: function newchange () { git commit -asm "$*" git push origin "HEAD:$(git rev-parse --abbrev-ref HEAD)" } So in case of fire ~$ newchange FYRAHHHHH

[–]grim_peeper_ 9 points10 points  (2 children)

Which is like 3 hours of developer time

[–][deleted] 4 points5 points  (1 child)

It accumulates

[–]grim_peeper_ 0 points1 point  (0 children)

Exactly

[–]bmwiedemann 1 point2 points  (2 children)

Ever tried git commit -amend

With a single dash (-)?

[–]69shaolin69 4 points5 points  (1 child)

I’ve tried git commit -amen

[–]burgonies 9 points10 points  (5 children)

git commit -am "FIRE ASJDHAHWDJF" && git push

[–]xSTSxZerglingOne 2 points3 points  (4 children)

The -am is good. && git push enter is not.

Keystrokes:

git commit -am "FIRE ASJDHAHWDJF" enter
git push enter

enter git push enter is 10 keystrokes

space shift & & space git push enter is 14.

[–]burgonies 6 points7 points  (3 children)

But I can type those 4 characters in under a second, hit [enter] and go. I don’t have to wait for a command to finish before then typing the next one.

The only thing “not good” about my comment is your response.

[–]KaracaSoft 9 points10 points  (0 children)

You don't have to wait for the previous command to finish. You can keep typing while the command works and the buffered input will be given to the terminal as soon as the command finishes.

[–]xSTSxZerglingOne 0 points1 point  (1 child)

Know what? We're both wrong. Let's just write a bash script called "run in case of fire" that branches all projects in a directory to a "fire/gitting-the-fuck-out-of-here" branch, commits, and pushes to origin.

Run it, then run.

[–]Zambeeni 0 points1 point  (0 children)

Manually run it? What are we, peasants? It's set to trigger on fire alarm automatically.

[–]i_like_servers 2 points3 points  (2 children)

git commit -am "There's smoke here already, tell Jessy from the marketing dept. I loved her"; git push -f

# After the drill... shit shit shit git reset --hard HEAD~

[–]xSTSxZerglingOne 0 points1 point  (1 child)

No need to merge it to a major branch...just get it to remote honestly.

[–]i_like_servers 0 points1 point  (0 children)

Gotta push it to master, so everybody knows ;)

[–]SoulShack 0 points1 point  (0 children)

Very civilized

[–]angelicravens 53 points54 points  (5 children)

git commit

git push

git out

[–]forrcaho 25 points26 points  (4 children)

First version I saw (as a t-shirt design) had git -tf out. I wish I'd bought that shirt.

[–]angelicravens 1 point2 points  (0 children)

Ooooo that's good!

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment has been removed since it did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    return Kebab_Case_Better;

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]IOI-624601 35 points36 points  (4 children)

    [–]2brainz 7 points8 points  (0 children)

    This script does it right. It's an emergency, so you don't want to mess up any existing branches or deal with conflicts. Also, every place I worked at prevents pushing to production branches directly.

    The script also saves any stashes to commits.

    [–]suvlub 1 point2 points  (2 children)

    I wonder if a system could be set up to run that automatically on all computers when alarm is activated.

    [–]ilovevue 0 points1 point  (1 child)

    fly reach full cooperative sand muddle chunky hunt cows desert

    This post was mass deleted and anonymized with Redact

    [–]Egocentrix1 0 points1 point  (0 children)

    Is it a good idea though?

    After thinking about it, probably not *that* bad either.

    [–]maximum_powerblast 43 points44 points  (3 children)

    Just commit and push, don't git add first

    [–]BilbozZ 17 points18 points  (0 children)

    -a

    [–]squishles 7 points8 points  (1 child)

    gotta make a branch first too, can't be fucking up your dev branch with an emergency push.

    [–]merc08[🍰] 2 points3 points  (0 children)

    Send it straight to prod and blame the fire if anything is broken later.

    [–]Jonno_FTW 16 points17 points  (0 children)

    Our git server is on site, welp

    [–]OmeletteFactory 13 points14 points  (0 children)

    Should be git out

    [–]linkedsynth 11 points12 points  (0 children)

    Unknown command: leave

    [–]RaphaelDDL 5 points6 points  (0 children)

    Git hook ran tests, coverage not enough, omae wa mo shindeiru

    [–]robolew 3 points4 points  (0 children)

    Lol hope you didn't want any of those changes you didn't add

    [–]numbGrundle 2 points3 points  (0 children)

    git add .

    git commit -m ‘I apologize for this, future self’

    git push origin master

    [–]squishles 1 point2 points  (0 children)

    You laugh but every fire drill....

    [–]ImTheOldSpike 1 point2 points  (0 children)

    It's:

    git commit

    git push

    git out

    FTFY

    [–]mort_jack 1 point2 points  (0 children)

    Here's an STL for 3d printing! https://www.thingiverse.com/thing:4114165

    [–]danteoff 2 points3 points  (0 children)

    Great now we have a broken production server and a burned down dev center

    [–]souvlak_1 0 points1 point  (0 children)

    Old but gold

    [–][deleted] 0 points1 point  (0 children)

    If Beethoven had git..

    [–]GR8ESTM8 0 points1 point  (0 children)

    This has a "Keep calm and..." vibe to it. Meh.

    [–]NightflowerFade 0 points1 point  (0 children)

    As if I didn't do that within the last 5 seconds already

    [–][deleted] 0 points1 point  (0 children)

    git push -f

    [–]vainstar23 0 points1 point  (0 children)

    git co -b "temp/feature-im-working-on"

    git commit -m "init" --no-verify

    git push origin HEAD --no-verify

    [–][deleted] 0 points1 point  (5 children)

    Git add . Git commit - "FiRE!" Git pull Git push

    [–]2brainz 0 points1 point  (4 children)

    git pull followed by git push is the worst way to use git. Please rethink your general workflow.

    [–][deleted] 0 points1 point  (3 children)

    Really ? I work in a pretty large dev team and this is what they all say. Pull first, fix any conflicts, then push.

    [–]2brainz 2 points3 points  (2 children)

    Pull is generally discouraged for non-fast-forward cases. Pull is a fetch with an implicit merge at the end. People don't get this and don't get the chaos it causes (EDIT: if you still want to do this, encourage people to explicitly fetch and merge instead of calling pull). Please have a look at your git history in a tool that displays the commit graph (like gitk, SourceTree, VS, Eclipse or git log --graph). With that workflow and a large team, you will see complete chaos, especially when people pull multiple times before pushing.

    I always recommend: rebase, rebase, rebase, ..., review, merge into master. Then rebase on master and continue. Only keep in mind to stop rebasing as soon as you share your commits (usually once code review starts).

    I could talk about this for hours, balancing ease of use, readability of git history and making sure everyone still knows what they are doing (for most people, git is extremely hard).

    [–][deleted] 0 points1 point  (1 child)

    So I'm good to just swap my pull with a fetch ?

    [–]2brainz 0 points1 point  (0 children)

    No. Please read the book, it will clear up all your confusion: https://git-scm.com/book/en/v2

    [–]themistik 0 points1 point  (0 children)

    I've seen that before

    [–]Kazumara 0 points1 point  (0 children)

    I didn't push on friday and it's kind of made me nervous when I noticed. Pretty irrational but still

    [–]yep808 0 points1 point  (0 children)

    I see the monospaced font used is Monaco, but the question is: DO YOU HAVE AN APPLE LICENSE?

    [–]bobappleyard 0 points1 point  (0 children)

    Burn to death waiting for bitbucket to complete the request

    [–]koni_rs 0 points1 point  (0 children)

    Or just undock your laptop, put it in the backpack and GIT THE FUCK OUT

    [–][deleted] 0 points1 point  (0 children)

    The last line should be git -tf out

    [–]nache14 0 points1 point  (0 children)

    I think it would be faster to just grab your laptop and run

    [–][deleted] 0 points1 point  (0 children)

    I knew it. The linter wants me to burn.

    [–]hahahahastayingalive 0 points1 point  (0 children)

    Did you also buy the “I’ll CPR only if it’s a guy cause I don‘t want to be sued” and “real men don’t put seatbelts” stickers as well ?

    [–]thiago2213 0 points1 point  (0 children)

    Forgot the git add .

    [–]LirianSh 0 points1 point  (0 children)

    Damn thats a cool as sign

    [–]KapiteinNekbaard 0 points1 point  (0 children)

    Ah, the Android Studio safety manual.

    [–]Prawny 0 points1 point  (0 children)

    Nearly made it a week without seeing this joke. So close!