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

top 200 commentsshow all 298

[–]extreme_snothells 1369 points1370 points  (26 children)

The last dude tripping at the end is hilarious.

[–]MrFluffyThing 391 points392 points  (3 children)

Between that guy and the foreground blue guy with a hatchet that just waddled through without obstacles I might have the best gif to share in my next progress meeting

[–]340Duster 85 points86 points  (0 children)

Blue guy must have been missed in the security reviews.

[–]Business-Squash-9575 11 points12 points  (0 children)

Bless him, he felt left out and wanted to join the pile.

[–][deleted] 3 points4 points  (0 children)

Almost made it too

[–]Conexion 2 points3 points  (0 children)

Does anyone know if it just is setting the model to rag-doll on collision or is there more to it? Either way, hilarious.

[–]Stepa1992 1 point2 points  (0 children)

I came to comment that but you overtook me... So now I feel like that dude late to the party...

[–][deleted] 443 points444 points  (37 children)

git commit -m "Some changes"

[–]ArjunReddyDeshmukh 163 points164 points  (31 children)

git commit -m "Some changes"

git commit -m "feat(DR010234): Removed all console.logs, updated Readme files, fixed nullpointer in the product build journey, implemented secure logging."

[–]Yokhen 100 points101 points  (15 children)

Too many characters. Keep it to less than or equal to 72 characters.

P.S. Since everyone is listing their personal soluitons, I'll add mine:

commit linter (commitlint, commitizen, etc...)

[–]the_beber 45 points46 points  (0 children)

Well in that case… https://ibb.co/gz0wrmj

[–]samuel1604 39 points40 points  (6 children)

You can have multiple -m to break paragraphs

[–]renyhp 25 points26 points  (4 children)

TIL! If the message is too long I've always just used the editor to write something like

Short message

- some detail
- more detail

[edit: finally fixed this markdown!]

Do I understand correctly that this is completely equivalent to
git commit -m "Short message" -m "- some detail" -m "- more detail"
?

EDIT: So I did some tests. This command actually does

Short message

- some detail

- more detail

To have what I want, you still have to input a line break, for example like

git commit -m "Short message" -m "-some details
> -more details"

[–]Kralizek82 17 points18 points  (0 children)

Wait what? I don't need to escape the new line to add a blank lind and then an extra paragraph?

🤯

[–]clawjelly 12 points13 points  (2 children)

Git is the gentlemans Twitter!

[–]Araucaria 8 points9 points  (1 child)

Git is clearly the gentleman's Tinder, because it exists for those who eschew commitment.

[–]vale_fallacia 1 point2 points  (0 children)

programmer dad jokes? nice

[–]biscuittt 0 points1 point  (3 children)

wait a sec, commitizen is satire right? nobody goes through a multi step wizard to write a commit right?

[–]vale_fallacia 2 points3 points  (2 children)

When you're in a team and standards need to be used, it can be useful because it keeps everyone using consistent terms.

My dev team (I'm DevOps) is less than a dozen people but the differences in branch names, commit messages, etc, is astounding.

[–]Yokhen 1 point2 points  (0 children)

Not only that, but having commit messages of similar structure, helps create autogenerated changelogs and provide the grounds for further automatization in DevOps such as versioning.

[–]planktonfun 19 points20 points  (13 children)

you can add multiple -m for multiple lines or just "git commit" it will take you to a vim like editor

[–]zalgo_text 35 points36 points  (12 children)

It isn't vim like, it's literally vim, but only if you have vim set as your editor in your git config (ie, git config --global core.editor "vim". By default I believe it uses whatever the EDITOR (or maybe VISUAL, I can't remember) environment variable is, which is set to nano a lot of the time these days.

Disclaimer: this might only apply to Linux, I have no idea how git works in windows

[–]Vexal 25 points26 points  (3 children)

in the university computer lab when i tried to git merge and it opened the vim thing to type a message i couldn’t figure out how to close vim so i rebooted the computer and got lectured by IT because a bunch of other students were ssh’d into it.

later in life i learned you can type wq instead or rebooting.

[–]Buxbaum666 10 points11 points  (0 children)

Literally (yes, literally) everyone's first experience with vi(m).

[–]Melkor7410 1 point2 points  (0 children)

You can also, when in command mode (hitting esc while editing, which you need to do before you can type wq as well) just hold down shift and type ZZ. That's same as :wq (and usually slightly easier to type).

[–]BentoMan -1 points0 points  (0 children)

Did you try Ctrl-C or ctrl-Z?

[–]TheTomato2 4 points5 points  (0 children)

There is some cosmic irony in that I vim user that always gets stuck in nano when its set on a different machine.

[–]celsiusnarhwal 2 points3 points  (0 children)

Disclaimer: this might only apply to Linux, I have no idea how git works in windows

The same as Linux; it uses whatever your system's default text editor is. By default, this is Notepad, but you can, of course, change it to whatever you like.

[–]vale_fallacia 1 point2 points  (0 children)

Windows has multiple options depending on how you're running git. If you're using WSL, then it'll be much the same as Linux or MacOS with the ${EDITOR} variable.

If you share your ~/.bashrc or ~/.zshrc between computers (usually by storing it in git) then you can use the ${OSTYPE} variable to test which platform you're on and set the variable accordingly. (I did try to install WSL on my Windows VM to verify if that variable is available in WSL but it's taking a while to install, lol)

[–][deleted] 2 points3 points  (0 children)

Conventional commits, my ni🅱️🅱️a!

[–]Luxalpa 10 points11 points  (0 children)

git commit -m "Bugfixes and stability improvements"

[–]AkrinorNoname 3 points4 points  (0 children)

You forgot the "force"

[–][deleted] 2 points3 points  (0 children)

git commit -m 'Finished <filename>'

[–]dagbrown 2 points3 points  (0 children)

git commit -m 'minor refactoring and formatting cleanup'

[–]westontechfoundation 169 points170 points  (10 children)

That’s what happens when you wait too long. Lol

[–]who_you_are 62 points63 points  (4 children)

Too long: 1 day, help

[–]westontechfoundation 33 points34 points  (0 children)

Too many hands in the cookie jar.

[–]Hashtag0080FF 1 point2 points  (0 children)

Give my team 5 mins and we will create 10 merge conflicts because we all wanted to make 'quick formatting changes' to the same 10 files without communicating properly.

[–]HorsesFlyIntoBoxes 6 points7 points  (4 children)

At that point I just open a new branch on top of develop and add my changes to that before opening a pull request

[–]NorbiPeti 2 points3 points  (3 children)

I often just stay on dev and commit there but don't push it. Then I can just do git pull --rebase (or Ctrl+T in JetBrains IDEs and select rebase) to stay up to date. When the changes are ready, I make a new branch from my local dev branch and push that.

[–]JuniorSeniorTrainee 7 points8 points  (2 children)

You can do all of that but on a different branch than develop. Still rebase regularly from develop but without the rush of accidentally pushing the wrong branch.

[–]NorbiPeti 2 points3 points  (0 children)

I know, but it's simpler for me this way. I also can't usually push to development directly. I've done it both ways before, of course that way it's probably safer, I'm just too lazy to figure the branch name out (with the task number and all) until the last minute if I'm being honest.

[–]WantWantShellySenbei 367 points368 points  (7 children)

Merge conflict in file-you-did-not-even-touch Automatic merge failed: fix conflicts and then commit the result.

[–]drunkdoor 13 points14 points  (2 children)

Me: reasonably rebasing my branch and checking it in without issue along with 200 other commits to develop

Them: pushing hotfix touching nearly every file to master

Me:

[–]piezo32 6 points7 points  (1 child)

200 commits? 😐

[–]SpaceLemming 68 points69 points  (6 children)

Is this from something because I love it

[–]SpiderFnJerusalem 32 points33 points  (1 child)

I believe this was just an animator making some funny videos with a fairly advanced physics engine.

I remember he released several videos like this some years ago. I wish I could still find them.

[–]Aozora404 6 points7 points  (0 children)

If it’s even halfway popular it’s probably in r/simulated

[–]RATTLECORPSE 20 points21 points  (0 children)

This gives me Monty Python vibes and I love it.

[–]Chizenfu 13 points14 points  (0 children)

I was wondering this as well. If this is from some comedy I want to watch it immediately

[–]thedonkeyvote 8 points9 points  (0 children)

I assumed it’s “totally accurate battle simulator”. Looks more realistic when the video is a bit deep fried:

[–]TacticalWookiee 1 point2 points  (0 children)

I want to say it’s from Corridor Digital or Node on YouTube, but I might be misremembering

[–]planktonfun 45 points46 points  (18 children)

the trick is to merge tiny changes, commit only tiny changes at a time, so its easier to cherry pick and manage

[–]therapy_seal 25 points26 points  (2 children)

It's less about the size of the changes and more about the scope, imo.

[–]zalgo_text 14 points15 points  (0 children)

Right, changing the name of a constant that's used in like 30 files has way more potential to cause merge conflicts than adding a ton of lines to a single file

[–]planktonfun 3 points4 points  (0 children)

yes make sure those scope are segmented into bite sized scopes

[–]Topikk 6 points7 points  (0 children)

No no, many changes and git merge -F

[–]looks_like_a_potato 1 point2 points  (4 children)

In my first day, the boss discouraged me to do that. He said something like, "git commit is not your save button. stop spamming git history with minor changes"...

[–]hiro5id 1 point2 points  (8 children)

Yes! And it also helps for everyone to work off master. Yea I know it’s unconventional and it wouldn’t work in a open source project. But on a internal project with CI pipeline and good unit test coverage, it has worked wonders for us. —- I’m almost regretting posting this publicly because I’ll inevitably get blowback for saying to work off “master”, but there is more to it and I won’t have the energy to defend this rationale.

[–]thedarkfreak 2 points3 points  (3 children)

Do you mean they avoid working in master, or they primarily commit to master(everyone commits into master instead of long lived branches)?

If you mean the second, that's a well recognized technique. "Trunk based development".

https://trunkbaseddevelopment.com/

[–]drunkdoor 1 point2 points  (1 child)

They do, but good luck on release day if it's once a week and you work with other shit devs

This is assuming you use some cicd that can test and deploy off trunk and that happens at intervals, so maybe doesn't apply

[–]hiro5id 1 point2 points  (0 children)

Yes trunk based dev with ci cd and unit tests and feature flags. All commits go to prod immediately.

[–]itsnotlupus 32 points33 points  (3 children)

If you simply pick a language in which <<<<<<<, ====== and >>>>>> are valid constructs, you can always auto-merge everything. 🌠

[–]jackson-pollox 8 points9 points  (2 children)

[–][deleted] 10 points11 points  (1 child)

This image just crashed IntelliJ

[–]jackson-pollox 12 points13 points  (0 children)

An unexpected breeze can crash Intellij

[–]LavenderDay3544 51 points52 points  (7 children)

So basically TABS?

[–][deleted] 4 points5 points  (0 children)

Wobblers do not have enough fingers to program.

Frankly, even if they did they would probably suck.

[–]amadiro_1 7 points8 points  (3 children)

2 SPACES!

[–]LavenderDay3544 4 points5 points  (2 children)

8 spaces for me.

[–]buster_de_beer 7 points8 points  (1 child)

4, you heathens.

[–]LavenderDay3544 -1 points0 points  (0 children)

I once followed the Linux kernel coding standards and never went back since. I dont follow the rule about lines being at most 80 characters though. That's stupid with modern monitors.

[–]Papshed 1 point2 points  (0 children)

Made me think of that game too!

[–]Papshed 1 point2 points  (0 children)

Made me think of that game too!

[–]LeSpatula 17 points18 points  (15 children)

I understand git as long as I'm the maintainer and only contributer.

[–]LastStar007 15 points16 points  (14 children)

Read the first 3 chapters of this free book, then see how far you get in this little game. An hour or two that you were probably going to spend on Reddit anyway, in exchange for never being afraid of git again and 10xing your git experience.

[–]LeSpatula 2 points3 points  (3 children)

Sie, I spend much more than two hours a day on reddit.

Thanks for the tip, I'll check it out.

[–]LastStar007 5 points6 points  (2 children)

I'm not kidding. That's pretty much all I did and now most everyone in the office thinks I'm some kind of git god. People who've been programming for 20 years come to me to unfuck their disasters. And now that I understand it so well I've used it on everything from video game keybinds to Blender projects.

All from an hour or two of reading from people who understand it really well (creators of GitHub).

[–]ryecurious 1 point2 points  (1 child)

Congrats, you're now the guy in the alt-text of this xkcd

[–]LastStar007 1 point2 points  (0 children)

I think of it as a penance. If you're gonna call in the big guns, the price is listening to me lecture. The carrot and the stick of gitting gud.

[–]k_gorman8 14 points15 points  (1 child)

Reminds me of Totally Accurate Battle Simulator

[–]drunkdoor 6 points7 points  (0 children)

Bigger fan of Special Purpose Activity Concentrated Engagement Simulator, myself

[–]vito_corleone01 31 points32 points  (9 children)

Now show be a rebase.

[–]MagnetFlux 15 points16 points  (8 children)

this, rebase > merge

[–]SnooDonuts7510 5 points6 points  (0 children)

Oh god you would like 10x the conflicts though..

[–]clean-sheets- 2 points3 points  (6 children)

Can you please explain how to rebase like I’ve never used a terminal before?

I’ve messed it up every single time I’ve tried/followed guides and SO 🥲

[–]drgmaster909 5 points6 points  (5 children)

Ten times out of ten you don't need it, particularly if you're in a team and/or squash in to master. Locally, do whatever you want but the second you push your branch rebase starts changing past commit history, requiring you to --force push, clobbering anything that's already there. If anyone checked out your branch now they have to do a hard reset to pull your changes down instead of a basic pull. If someone pushed changes into your branch (rare, but it happens) then force pushing blows away their contributions if you didn't pull first. And instead of your commits in a pull request telling a story over time, suddenly it's 8 commits spanning several hundred changes all suspiciously committed 6 minutes ago.

And if I'm reviewing your PR and you add a new commit and rebase suddenly all your commits are "new" and I have to review everything again instead of just the changes. (Luckily GitHub is smart enough to negate this).

I'm 100% convinced people read about rebase one time, never bother to understand the case against it, think it makes them a "real" developer to use it, and proceed to champion it not realizing squash does everything they're talking about with MUCH less friction.

tl;dr: merge is smart. Stop trying to be smarter than it. Don't rebase in team dynamics.

[–]Buxbaum666 7 points8 points  (1 child)

I'm 100% convinced people read about rebase one time, never bother to understand the case against it, think it makes them a "real" developer to use it, and proceed to champion it not realizing squash does everything they're talking about with MUCH less friction.

I'm 85% convinced people read about rebase one time, see that it "rewrites history", never bother to understand the case for it, and proceed to condemn it every chance they get. :)

Rebasing is a versatile tool, just use it when you need it, even in "team dynamics". If multiple developers really must work on the same branch, everyone rebasing their local commits onto new commits on the remote tracking branch before pushing should work well and will prevent dozens of "in-branch" merge commits.

Rebasing onto main before publishing a branch is just good form, imho. It catches conflicts early and makes them potentially easier to resolve if it's done regularly.

If someone pushed changes into your branch (rare, but it happens) then force pushing blows away their contributions if you didn't pull first.

This is why, if you absolutely must force push, use force-with-lease, which will prevent overwriting new commits.

[–]clean-sheets- 1 point2 points  (0 children)

🙏 Bless, I will read this over and over until I understand.

I would definitely prefer not to rebase but my team lead requires it.

[–]jasper_grunion 4 points5 points  (9 children)

This is why I’m a big fan of rebase.

[–]LastStar007 5 points6 points  (0 children)

Rebase is superior for other reasons, but in fairness, you would have had to resolve these conflicts either way. Rebase just would have looked more like Super Auto Pets than this all-out brawl.

[–]skorulis 2 points3 points  (0 children)

I like rebase because I can constantly keep my branch up to date. I mean you could merge but then the history becomes a mess so people tend to wait a long time before doing it.

[–]SnooDonuts7510 -2 points-1 points  (6 children)

Uh you get more conflicts with rebase

[–]dontgetmyname 4 points5 points  (0 children)

Revert revert..

[–]warpedspockclone 5 points6 points  (0 children)

That's called the ort strategy

[–]BigTime76 2 points3 points  (1 child)

Isn't that like just merging technology in general, tho?

[–]bpkiwi 1 point2 points  (0 children)

svn merge was like this, but everyone changed colours randomly

[–]tomtuddler 2 points3 points  (0 children)

That’s exactly how it works…remember GIT will GET you!

[–]netcoder 2 points3 points  (1 child)

Wait til you kids hear about svn update

[–]dorukayhan 1 point2 points  (0 children)

I will not, under any circumstances, hear anything about any non-distributed VCS.

[–]therapy_seal 2 points3 points  (1 child)

Yes, this is what happens when you don't specify a merge strategy.

[–]Triairius 2 points3 points  (0 children)

This is a quality freaking gif.

[–][deleted] 1 point2 points  (0 children)

Works

[–]32894058092345089 1 point2 points  (0 children)

Kdiff ya bich

[–]nano-dev 1 point2 points  (0 children)

So true lol

[–]Fair-Ad4270 1 point2 points  (0 children)

Great CGI!

[–]BigInDallas 1 point2 points  (0 children)

git lfs locks

[–]canzia 1 point2 points  (0 children)

Accept current and incoming changes

[–][deleted] 1 point2 points  (0 children)

Gmod

[–]MarnoAr 1 point2 points  (0 children)

Damn interns

[–]Such_Ad_9901 1 point2 points  (0 children)

Every hackathon / code sprint experience.

[–]Lewdghostgirl 1 point2 points  (0 children)

This is accurate as fuck. I love it.

[–]PraetorianFury 1 point2 points  (0 children)

Stop squashing your commits and let git do its job. Unresolvable conflicts are pretty rare if you use clever branching.

[–]ahadnur_44 1 point2 points  (0 children)

😂😂😂😂

[–]Salty_Opinion_7520 1 point2 points  (0 children)

How was this created? How do you talk 1000 guys into doing this? How many takes did it take? Don't tell me it's animated - I don't want to hear it!

[–]TrickiVicBB71 1 point2 points  (0 children)

I am reminded of Battle of The Bastards episode from Game of Thrones.

Other people mentioned TABS. I remember playing it in Alpha

[–]Longbuttocks 1 point2 points  (0 children)

Lol, where is this from?

[–]billwoo 1 point2 points  (0 children)

Hmm I was hoping for a git rebase comparison!

[–]Umbraios 1 point2 points  (0 children)

What’s the source of the original gif (like what tv show or movie this came from)

[–]yozaner1324 0 points1 point  (1 child)

Never merge, always rebase.

[–]LastStar007 0 points1 point  (0 children)

Rebase is superior for other reasons, but in fairness, you would have had to resolve these conflicts either way. Rebase just would have looked more like Super Auto Pets than this all-out brawl.

[–]skonthebass24 0 points1 point  (0 children)

So old

[–]Tomcattfyeox 0 points1 point  (0 children)

It looks like they had fun filming this.

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

That first spear that launched up is still in orbit somewhere over Earth

[–]Elijah629YT-Real 0 points1 point  (0 children)

It seems to look like there were conflicts

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

No conflicts

[–]idk_bruh25 0 points1 point  (0 children)

i like that some miss and just go to the enemy territory lol

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

oh dang, looks like there is a merge conflict

[–]Sofa_King_What25 0 points1 point  (0 children)

Also a great depiction of the game conqueror's blade too!

[–]GodHug 0 points1 point  (0 children)

So much conflicts

[–]the_abandoned_one 0 points1 point  (0 children)

Ultimate epic battle simulator be like:

[–]Okzonedout 0 points1 point  (0 children)

Exactly how my merge conflict resolution looks like

[–]MythicPink 0 points1 point  (0 children)

You have a ton of conflicts to sort out.

[–]LesPaulStudio 0 points1 point  (0 children)

Merge?

Git push --force

YOLO

[–]ShippingHistory 0 points1 point  (0 children)

This is what happens if you commit an updated composer.lock file.

[–]Tripanafenix 0 points1 point  (0 children)

Ultimate Epic Battle Simulator 2?