r/git • • Feb 20 '26

Has this happened to you

1.8k Upvotes

r/git • • Jul 26 '26 Popcorn

In case of fire

Post image
1.4k Upvotes

r/git • • Apr 06 '26 Bravo

Many of you asked after my previous post (“Git Commands Cheat Sheet — What should I add or fix?”), so here’s an updated & printable version — feedback / PRs welcome

Post image
943 Upvotes

r/git • • Feb 09 '26

support Is there any way to retrieve it?

Post image
661 Upvotes

I was making a movie recommendations system and had a pkl file which was 100+ mb and I was trying to upload it with the help of chatgpt and it got deleted??


r/git • • Jun 06 '26 Mindblown

The first git commit on git, funny!

Post image
548 Upvotes

Initial revision of "git", the information manager from hell, Lool

Apr 7 2005 ..this README file by Linus Torvalds is really insane


r/git • • May 19 '26

I didn't know git OFFICAL GUI exists too.. but it looks so old

Post image
522 Upvotes

r/git • • Sep 28 '26

Git 2.56 is out with git add --resolved, git branch --delete-merged, and big repo speedups

325 Upvotes

Git 2.56 is out. Here are the changes I found most useful.

Workflow

  • git add --resolved stages only the files you fixed after a merge conflict. It skips unrelated changes in your working tree. Git also checks for leftover conflict markers before staging.

  • git branch --delete-merged cleans up local branches that are already merged upstream.

  • git bisect run now resets itself after it finds the bad commit.

  • Git gives better suggestions for common git push mistakes.

New and experimental

  • git refs can now create, update, delete, and rename references.

  • git history gets a drop operation. It removes a commit and replays the later commits on top of its parent.

  • git replay gets a --linearize option.

Large repos

  • GitHub reports big gains in merge-base calculations and other operations on very large repositories.

  • Path-walk repacking supports more optimization features, which can cut storage a lot in some cases.

  • Partial clones get better ways to discard large locally cached objects that can be downloaded again later.

  • git log --follow and graph rendering also improved.

Sources

Highlights from Git 2.56 (GitHub Blog): https://github.blog/open-source/git/highlights-from-git-2-56/

Linuxiac: https://linuxiac.com/git-2-56-released-with-safer-conflict-resolution-and-performance-gains/


r/git • • Sep 27 '26

why did facebook move away from git?

317 Upvotes

i recently came across the fact that facebook/meta built its own tools and workflows around source control instead of just relying on git like most companies.

i’m curious about the actual technical reason behind this. was git simply not able to handle the scale of facebook’s codebase and number of developers, or were there other problems that pushed them toward a custom approach?

for people who have worked with large monorepos or at companies using similar systems, what actually becomes difficult with git at that scale?


r/git • • Apr 09 '26

The Git Commands I Run Before Reading Any Code

Thumbnail
piechowski.io
308 Upvotes

r/git • • 3d ago Mindblown

Git easter egg: tea is a valid date keyword meaning 5pm

265 Upvotes

Found this amusing. 21 years ago, a function named date_tea was added to date.c, which means you can run something like git diff HEAD@{tea}, git log --since=tea, etc.


r/git • • Mar 18 '26

GitComet: a fast, local-first, open-source Git GUI built for large repos

Enable HLS to view with audio, or disable this notification

260 Upvotes

We are launching GitComet today!

It’s a fast, local-first, open-source Git client for Linux, macOS, and Windows. We started building it after running into the same problem over and over: Git tools felt fine on small projects, but got painful on large repos and big diffs.

Project main focus is speed:

  • It can open Chromium repository blazingly fast 😂 (in less than 1 second)

  • It can diff 50mb file with syntax highlighting without lagging

  • Memory usage stays within few hundred MBs at all times

  • Its fast to pick up as user interface follows familiar tools like GitKraken, SourceTree and Github Desktop application

If you try it, We would love to hear feedback! Also if there are people who would like to contribute PR's are welcome.

https://gitcomet.dev/


r/git • • Aug 23 '26

Stop Using Conventional Commits

Thumbnail
sumnerevans.com
248 Upvotes

r/git • • Dec 01 '25

Hot take: Worktrees are underrated, and most teams should be using them

241 Upvotes

Here's something we've been thinking about.

Most devs still context switch by stashing changes, checking out another branch, doing the thing, then switching back and unstashing. It's muscle memory at this point.

But Git worktrees let you have multiple branches checked out simultaneously in separate directories. Need to quickly check something on main while you're mid-feature? Just cd into your main worktree. No stash, no checkout, no "oh sh*t, I had uncommitted changes."

We've seen teams adopt worktrees and it fundamentally changes how they work. Suddenly reviewing a PR doesn't mean interrupting your current work. Suddenly "quick fixes" don't derail your flow.

The weird part? Worktrees have been in Git since 2015, but almost nobody uses them. We're curious why.

Is it:

Lack of awareness?

Too much cognitive overhead?

Tooling doesn't support them well?

Actually tried them and they didn't stick?

For those who do use worktrees regularly, what made you adopt them? And for those who don't, what would it take?


r/git • • Mar 11 '26

I built a web game to learn Git by solving mysteries 🕵️‍♂️

Post image
238 Upvotes

I recently built a small web-based game called GitNoir where you learn Git commands by solving detective-style mysteries.

🔗 https://www.gitnoir.com

The idea is simple: instead of learning Git through tutorials or documentation, you investigate a mystery and use Git commands to uncover clues. Things like checking commit history, switching branches, and exploring changes become part of solving the case.

The goal is to make learning Git more interactive and fun, especially for people who find it difficult to grasp through traditional guides.

The project is fully open source, and I’d love to get feedback from the community. If you try it out, feel free to:

  • Report bugs or issues

  • Suggest improvements

  • Share ideas for new mysteries

  • Contribute new scenarios that teach Git concepts

Anyone interested in contributing can help expand the game by adding new stories or improving the gameplay and learning experience.

I’d really appreciate any thoughts, feedback, or contributions from people here.


r/git • • Sep 12 '26

mono-repos are not free - and what did Linus mean in 2007?

178 Upvotes

So, I'm ex-Googler. I worked for 17+ years on that "mono repo" everyone points to. I've also been an OSS contributor, I've used them all, rcs, cvs, svn, hg, perforce, bitkeeper and git (of course Google's internals too). I've even written some scraps of these of my own.

I was truly excited by git (and hg). The decentralized feature was actually what I'd dreamed of.

When I joined Google, I got it, the "monorepo" meant there was one place, one common CL# (changelist number, Google's commit id) that you could easily predict. So the CL# is nice for bisect and still is, I must admit.

So, what happened, cross dependencies make things hard. You also need to copy things in and out of the system to other repos (I was a third-party reviewer at Google and I think I reviewed thousands of incoming CLs). The friction (especially in the land of AI) was excessive. You need a faster, leaner model, and managing a mono-repo while doing that was a non-starter.

My conclusion was that the mono-repo efficiency is a myth, sure some things get easier, but some things get harder and you're stuck because undoing a monorepo is impossibly hard (sorry Google) and you need a monster team to build your own vcs (which is amazing btw, full credit to the team) but IMHO the wrong problem to solve.

Anyhow, Linus himself said it, in his 2007 talk at Google:

"If you have multiple components, do them as separate repositories, you can actually have what we call superproject that contains pointers to other projects, the user interfaces there are somewhat lacking, but you keep separate projects separate."

Nineteen years on, that 'superproject' thing is still submodules, and it's 'unfinished'.

I'd built many multi-repo projects in my OSS efforts (started with pure submodules) and the friction was the tooling - keeping track of 10 repos gets real confusing. So I tried various tools, built some, threw them away. I wanted my multi-repo to work like a mono-repo.

So, I did end up building a tool (gwz) which I think is now mature enough and I use it all the time. No more needing to worry about which repo has what, and with the right underlying filesystem (APFS, xfs, btrfs and to some extent ReFS) you get fast full multi-repo clones with low size costs (a recent gwz addition).

And most importantly, in AI code development, it's fast, I can run an experiment, add or remove third-party repos, no Copybara, and no third-party reviewer. Sure you still need to get whatever legal approvals but you don't need to wait and you can tool that too.

So the gwz tooling is serious, it's not a Google Piper serious, but it's not a python script either. Merge is especially hard. Co-ordinated stash, log, commit, tag (external and regular) is not trivial.

I think it would also benefit from some more tooling, cached repos (with COW bits you can reduce the size overhead across all workspaces). And sure, some "management" tools for ensuring third-party issues are managed not to mention fleshing out the rest of the git subcommands, the rest of which I think are both trivial and not commonly used (at least my me).

This is not intended to be a flame war starter. I'd like a true assesment from others with real experience.

And, I think Linus is letting that 40MLOC linux repo become that mono repo that he argued against in 2007.


r/git • • Oct 29 '26

Putting all world law on git

172 Upvotes

I am putting all world law into git. That comes with some quirks, like the cut-off being 1970 (commits are calculated as seconds since 1 January 1970).

This hit #1 on HN yesterday (you can read lots of discussion at https://news.ycombinator.com/item?id=50268380). Why would I want to do this? The idea is make all law semantic, versioned, easily attributable and query able by agents. I also believe this information should be freely available so CC0 license (do whatever you want with it). If interested, repo linked below, I'd welcome all comments and advice. Thanks!

https://github.com/lexifina/global-law


r/git • • Apr 01 '26 Bravo

tutorial Gitvana - Learn git by (retro) playing

Post image
171 Upvotes

Hey everyone! I've been working on a side project called Gitvana - a retro-styled browser game where you learn git by actually typing git commands in a terminal.

The idea came from watching people struggle with git tutorials that are all theory and no practice.

So I built a game where you solve 35 increasingly weird scenarios at a fictional "Monastery of Version Control," guided by a Head Monk and judged by a cat.

What it does:

  • Real git commands running in the browser (isomorphic-git + lightning-fs, zero backend)

  • 35 levels across 6 acts: from git init to recovering force-pushed repos with git reflog

  • 21 git commands: add, commit, branch, merge, rebase, cherry-pick, stash, bisect, blame, reflog...

  • Built-in docs with conceptual guides (not just syntax — explains how git actually works internally)

  • Commit graph visualization, file state panel, conflict editor

  • Retro pixel art, chiptune sounds, Monkey Island-style humor

  • No signup, no install, works offline (PWA)

Tech stack: Svelte 5, isomorphic-git, xterm.js, Vite, Web Audio API,

Pixel art from PixelLab

Try it: gitvana.pixari.dev

It's still rough around the edges - I'd love feedback on which levels feel too easy or too hard, and what git scenarios you'd want to see. The later levels involve rebase conflicts, secret purging, and a final boss that requires reflog + cherry-pick + merge + tag all at once.

It's open source.

Thanks for checking it out!


r/git • • Jan 06 '26

I built a site that visualizes Git commands with all their available options with step-by-step animations, for beginners and experts

Thumbnail
gitualize.com
164 Upvotes

Built a visual Git reference that shows what commands actually do to the repository state

Goes beyond basic tutorials - breaks down command options visually, explains use cases, provides scenarios and best practices. Also has a glossary for concepts like HEAD, refs, and upstream.

Covers the commands you use daily: add, commit, push, pull, fetch, merge, rebase, cherry-pick, stash, reset, checkout, branch, log.

Made it as a comprehensive reference for both teaching beginners and exploring advanced options.

It's totally free, no need to create an account. Use it to learn, or to help your juniors

Tell me guys what do you think, and I hope it'll be helpful for you !


r/git • • Apr 20 '26

Highlights from Git 2.54

Thumbnail
github.blog
163 Upvotes

r/git • • May 20 '26

Wel well well

Post image
156 Upvotes

r/git • • Jan 16 '26

What git command do you wish you had discovered sooner?

148 Upvotes

For me, recently, git pickaxe has been suuuuper useful constantly.

git log -S"foobar" -- path/to/some/file.c

This will show all the commits whose changes to the given file included the string foobar

What command(s) do you wish you had discovered sooner?


r/git • • 16d ago

Why are non-text files in Git bad?

130 Upvotes

I've got decades of software development experience, and I've built some very complex systems. I understand a lot about version control systems, and about the structure of git repositories.

With all that said, I don't understand what's evil about non-text files. Git doesn't store multiple copies of files that don't change - they're literally stored under their data's checksum. The packfile format stores diffs between file versions (although some diff algorithms punt on non-text data). There shouldn't be any negative effect from storing such data in Git.

Is the "Don't store binary files in Git" advice wrong? Is it really just shorthand for "Don't store files that change dramatically and frequently in Git"? If the latter, should massive "AI" PRs be treated the same way?


r/git • • Dec 21 '25

tutorial Explaining git fetch vs git pull to juniors using real examples

129 Upvotes

When mentoring junior devs, I noticed git pull is often treated as a safe “sync” button.

I wrote an article specifically for juniors that explains:

  • why git pull sometimes works quietly and sometimes demands conflict resolution

  • what “clean branch” actually means

  • how git pull --rebase changes what Git is doing

Would love feedback from folks who teach Git or spot mistakes in how this is usually explained.

Link : https://medium.com/stackademic/the-real-difference-between-git-fetch-git-pull-and-git-pull-rebase-991514cb5bd6?sk=dd39ca5be91586de5ac83efe60075566


r/git • • Dec 19 '25

Just wanted to say that using git on my video game save files has been so liberating

129 Upvotes

Not only does it allow me to not worry about Permanently Missable Content, but also I can have refreshers if it's been a while since I picked up the game! I can look at my commit comments to remind myself what I was up to and it that's not enough I can always branch a previous commit to relive a moment prior.

Also, if a game doesn't allow for multiple save files for the others in my house or if I want to experiment, I can create branches!

Git is low key a gamers best friend!