r/git • • 1d ago Mindblown

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

182 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 • • 9h ago

Alguien sabe si se puede hacer que un repositorio se muestre que se creo hace 2 meses? Es para un presentación para mi Profesor ;(

0 Upvotes

r/git • • 22h ago

GitHub alternatives: Forgejo, Codeberg, Tangled and cgit – what's your experience?

0 Upvotes

One thing worth remembering is that Git and GitHub aren't the same thing. Git is a distributed version control system, and GitHub is one platform built around it.

I've been looking into other platforms developers can use to host and collaborate on Git repositories.

I covered four options in a video:

  • Forgejo – Self-hosted Git hosting and collaboration.
  • Codeberg – Community-run hosting built on Forgejo.
  • Tangled – Decentralised collaboration using the AT Protocol.
  • cgit – Lightweight repository browsing, rather than a full pull-request platform.

I also briefly cover Git's origins and the differences between these projects.

I made this video for my channel, Kodairo, and would be interested in hearing from people who have actually used these platforms.

What do you use for your Git repositories, and what made you choose it?

Video: https://youtu.be/HEUoytN4Yy4


r/git • • 1d ago

If you were in charge of rewriting a git subcommand or internal behavior from scratch, what would you change and how?

0 Upvotes

I'd like to get an idea about what are people's least favorite git command and what they would change about it.


r/git • • 2d ago

support Committed a secrets file in my first internship week and realized I know about 6 git commands

64 Upvotes

first week of my internship and i committed an env file with sandbox keys to our team repo. nobody panicked, my mentor walked me through rotating them and rewriting the history, but watching him i realized i know maybe 6 git commands and understand none of them. my team will reimburse a course and theres 10 weeks left here. what would you have an intern learn first so they stop being scared of git??


r/git • • 1d ago

support I built a local Git history explorer that lets you time-travel between any two commits

0 Upvotes

git-tm (git-time-machine) is a simple nodejs cli (npx git-tm) which launches a browser window to visually see and compare what happened across commits across branches without modifying the code. (Basically, shows you what happens when you move from commit A to B or vvice versa)

This was a hackathon project (FOSS Hack 2025) which was first made in 2025 February.
we did not win the hackathon, but I personally used this tool whenever I was working in large repos.

Recently for a project I reinstalled the tool and did not like how the UI looked and it also had many bugs, so I just revamped the whole thing properly with no dependencies. I just republished v1 to npm and was using this at workplace.

some friends at work said this is good, so I polished and made it better for public use.

this currently works on purely git commands now.

I wanted some opinions on how good this is and how I could make this better.

github link: https://github.com/nandhu-44/Git-Time-Machine/
docs: https://git-time-machine.js.org/
npm: https://npmjs.com/package/git-tm/


r/git • • 1d ago

tutorial Two Developers OneLine GitMerge Conflict

0 Upvotes

What happens when two developers working on the same branch modify the exact same line of code differently?

Git can't automatically decide which change to keep, and that's where a merge conflict happens.

I made a short visual explanation of this using the multiverse chaos of Avengers: Doomsday.

A simple Git concept explained through a fun tech analogy.

Video: https://youtu.be/QCf2AztQOvU?si=ulEjPiaZsUNLhSYi


r/git • • 3d ago

We built a time tracker that uses Git as a database

0 Upvotes

We've been using Git for version control for years, but recently we decided to try something a bit different: using it as a database for our team's time tracker.

Instead of running a backend and a database, we built a browser extension that stores everything needed for team time tracking in a private GitHub repository.

Here's how it works:

  • Time entries are stored as plain JSONL files, grouped by month and user.
  • Each team member writes to their own branch.
  • Changes are saved locally and synced in the background.
  • Git gives us version history, data portability and a way to recover previous versions of our timesheets.
  • Reports and invoices are generated directly in the browser.

Our whole team at Manticore Search has been using it for about a month now, and so far it's been working well.

The project is called Clockoli. It's free and open source, with no application backend of its own.

Clockoli relies on the GitHub API, but there's no Clockoli backend, and we don't have access to your time entries.

What I like most about this approach is that even if Clockoli disappears tomorrow, your data is still there. You can clone the repo, inspect its history, analyze the data with your own scripts or build your own tools around it.

https://github.com/clockoli/clockoli


r/git • • 4d ago

I built git-lineage to trace code back to its actual origin, cutting through formatting churn and noisy Git history

0 Upvotes

Hey r/git

I was working on a richer and deeper git blame to fix my personal pain, though of externalising it. Project is live on https://github.com/NayanSrivastav/git-lineage. Would appreciate some love or hate. Please take a look and share your feedback, appreciate your time.

Usage: https://nayansrivastav.github.io/git-lineage/


r/git • • 4d ago

Goat Hooker: Git hooks that skip what didn't change. Feedback welcome

Post image
0 Upvotes

I got tired of pre-commit hooks re-running the same 10 seconds of checks every time a commit message got rejected, and of mono-repos where every hook runs on every project. So I wrote Goat Hooker, a Git hooks manager in Rust.

What it does differently:

  • Only what changed. Each hook runs on the staged files it targets, and a hook whose files didn't change since it last passed is skipped. Retrying a commit with 5 hooks takes ~24 ms instead of re-running them.
  • Sees exactly what you commit. Unstaged changes are put aside while hooks run, and files fixed by formatters are staged again.
  • Mono-repos. Each project has its own hooker.config.json. Dependencies are read from Cargo / package.json / go.mod, so changing core also runs the tests of api.
  • Hooks can depend on each other and pass values. For example, a codegen hook hands its output to a lint hook.
  • hooker watch runs the hooks while you stage, so git commit itself is instant.
  • hooker import converts husky / lint-staged, lefthook and pre-commit configs.
  • There's also a desktop app if you'd rather click than edit JSON.

I benchmarked a git commit against lefthook, pre-commit and husky + lint-staged. With one no-op hook, the overhead is about the same as lefthook (30 ms vs 28 ms). It's well below pre-commit (146 ms) and husky + lint-staged (395 ms). The method is in the repo if you want to check it.

It's pre-1.0, so the config may still change. I'd love feedback on what breaks in your workflow, or what your current hooks manager does badly.

Repo: https://github.com/zuygui/goat-hooker

If you find it useful, a ⭐ on GitHub helps a lot: it's how a small project like this gets noticed.

(Yes, I know about the name.)


r/git • • 5d ago

support What is an elegant way to jump back to the tip of the branch where you were at?

10 Upvotes

Suppose I do the following:

git checkout HEAD~5
git checkout HEAD~10
git checkout HEAD~100

I am now at a detached HEAD and it is not immediately obvious which branch I was at. What is an elegant way to go back to tip of the branch where I was originally at?

I can get a list from the reflog with git reflog --format='%gs' --grep-reflog='checkout: moving from' | awk '{print $4}' but this contains both branch names and commit hashes so I will have to further process them (git show-ref?) to discard the hashes and I'm wondering if there is a more elegant way to do it.

UPDATE: Solved


r/git • • 5d ago

survey Ditched GitHub (and skipped Gitea/Forgejo) for personal repos, wiki, and dotfiles: $0 3-2-1 setup with local git + restic + free R2/Dropbox + external HDD

0 Upvotes

I used to push my personal repos, markdown wiki, and dotfiles to private GitHub repos just for peace of mind, and almost spun up Forgejo on a small VPS when I decided to move off GitHub. Then I realized I didn't actually need a web UI, PRs, issues, or another daemon to patch and back up — git is already a complete history database, and a forge doesn't even solve the two things local git misses: uncommitted work and git-ignored files like .env and tool configs.

What I ended up running instead costs $0/month and uses zero background RAM. Local git handles normal committed history, and everything else is layered on restic (whole payload after excludes is ~420 MB, so it fits free tiers with years of history):

Hourly local restic snapshots run via a systemd --user timer into a separate Btrfs subvolume on the laptop (btrfs subvolume create so Snapper snapshots don't pin pack files that restic prune already deleted). That's my fast undo layer for uncommitted edits, .env files, or an accidental git reset --hard.

Every couple of weeks I plug in a USB external HDD and run one script that syncs both an encrypted restic repo and bare git clone --mirror copies for instant offline cloning. Daily offsite restic snapshots go to free-tier S3-compatible storage (Cloudflare R2's 10 GB free tier, or free Dropbox via rclone) with 14d / 8w / 12m retention, client-side AES-256 encryption, and a healthchecks.io dead man's switch that alerts me if 36 hours pass without a clean offsite run.

Compared to just pushing private repos to GitHub, the storage provider only ever sees opaque encrypted packs, accidental .env commits aren't sitting unencrypted on a third-party server, and restoring a single uncommitted file from Tuesday afternoon is one restic dump command. The only real trade-off is bootstrap discipline: if the laptop dies, you need your RESTIC_PASSWORD and offsite bucket creds stored outside the machine (password manager + paper copy) so you don't lock yourself out of your own backups.

Anyone else running pure local git + restic/borg instead of self-hosting Gitea/Forgejo, and how do you handle the "laptop stolen, need to bootstrap offsite restore from scratch" part?


r/git • • 9d ago

Codeberg.org is gone

112 Upvotes

Update: it is now back up, with whois codeberg.org reporting only Domain Status: clientTransferProhibited anymore.

FYI, Codeberg's domain is down, as per their socials: https://social.anoxinon.de/@Codeberg/117636454915265360

Almost nowhere is this being talked about (or Reddit search is just uncooperative), and r/codeberg is banned for breaking Reddit rule 2? That sub was barely even active, but anyways.

Edit: https://status.codeberg.eu/status/codeberg tracks the status on an alternative domain.


r/git • • 8d ago

Codeberg domain name suspension post-mortem

Thumbnail codeberg.org
0 Upvotes

r/git • • 9d ago

Accelerating development for massive Git repositories

Thumbnail developers.googleblog.com
0 Upvotes

r/git • • 9d ago

How the hell does Codeberg know which institution I go to

0 Upvotes

I just created my profile with my personal E-Mail there, made a commit to a private repository using Git GUI, and now I'm looking at it, and for some reason, it figured out my name and my instituion? I don't have that info on my E-Mail, let alone my Codeberg account... how the hell does it know this????????


r/git • • 9d ago

I got tired of my agents trampling each other's branches, so I built a Git client where each one gets its own worktree

0 Upvotes

gitmoire is a free desktop Git client I've been building (Windows, macOS, Linux). The 1-minute video above shows what it does.

What it does:

  • Battleplans. You describe a task or pick a Linear issue, review the plan, and then each agent gets its own worktree. Nobody fights over main.
  • Any AI CLI, right in the repo. It works with Claude Code, Cursor, Codex, Gemini, OpenCode and Antigravity.
  • A graph that doesn't flinch. It handles 100k commits with no lag.
  • AI does the grunt work. It drafts commit messages, reviews and atomic commits, and suggests conflict resolutions. Nothing auto-accepts and nothing auto-stages; you approve every change.
  • Diffs down to the word, plus Gitmoji-ready prefixes and saved quick commits you can reuse.
  • Keyboard-centric. There's a command palette for everything.
  • 15 themes. It can also follow your Omarchy system theme live.
  • Zero telemetry and zero accounts.

It's free. I'd love feedback from anyone running several agents at once: what breaks your flow today?

gitmoire.dev


r/git • • 11d ago

Git patched six security vulnerabilities — recursive clone RCE, ref path traversal and merge/import memory issues

12 Upvotes

Based on the Git project’s technical breakdown published on November 10, 2026, and CERT-In’s CIVN-2026-0552 notice from November 16, here is the architectural impact.

The most interesting issue is CVE-2026-111760. Git’s index path handling had an integer-truncation problem: an extremely long path could pass validation under one name and be written using a shorter name. In a malicious repository, that can replace a submodule’s .git file with a symlink to attacker-controlled configuration or hooks. The vulnerable client can execute attacker-controlled code during recursive clone.

The other five issues affect different processing paths:

  • CVE-2026-113408: path traversal through a server-advertised protocol-v2 HEAD symref.
  • CVE-2026-105437: heap-buffer overflow during large merges.
  • CVE-2026-114467: stack memory corruption in GPG signature handling.
  • CVE-2026-114469: out-of-bounds read while processing binary patches.
  • CVE-2026-114466: unsafe file access through selected fast-import stream features.

The practical exposure is not restricted to developer workstations. Git is often embedded in CI images, IDEs, merge queues and import services. Updating the host OS package may leave a bundled Git binary untouched.

Git recommends 2.56.1 or the patched release for the relevant maintenance branch. Until patched, its temporary mitigations include avoiding recursive clones and merges of untrusted content, and not processing untrusted binary patches or fast-import streams.

Primary sources:

TechGines context: we previously covered the server-side Gitea diffpatch RCE. This new analysis is about Git clients and repository-processing pipelines:
https://www.techgines.com/post/gitea-cve-2026-60004-diffpatch-rce-exploited

For teams that accept external pull requests, how are you isolating recursive clone and merge operations today: disposable runners, restricted submodule URLs, network egress controls, or another design?


r/git • • 11d ago

What's the best way to learn Git and GitHub effectively?

5 Upvotes

I'm looking to learn Git and GitHub from scratch. What's the best way to learn them effectively? Which resources would you recommend, and how should I practise to become comfortable using them in real projects? I'd appreciate advice from people who have learned them or use them regularly.


r/git • • 10d ago

I built GitCraft - a free, open-source GitKraken alternative with local AI support

Post image
0 Upvotes

r/git • • 11d ago

dffy: a terminal diff viewer in Rust that stays fast on big repos

0 Upvotes

I spend my days reviewing diffs from coding agents in the terminal, sometimes from my phone over SSH, and none of the tools I liked quite fit. lumen leans on AI features I didn't want in a diff viewer, hunk runs on a JavaScript runtime, and both got slow on the monorepos I work in.

That's why I decided to build dffy: https://github.com/amalucelli/dffy a single Rust binary that combines what I liked from each of them and stays fast on big repos. It shows the first files as soon as they're found and loads the rest in the background. On the Linux repom the diff v6.0..v6.1 (~13k changed files) the first screen is up in miliseconds vs seconds from lumen and hunk.

A few other things it does:

- staged, unstaged and untracked changes in one view, conflicted files from a merge or rebase with their markers highlighted, and renames detected the way git does it

- works as git's pager, the git add -p filter and difftool, and compares plain files and folders outside a repo too

- every action is a single key, with a command panel on space, and the layout adapts down to a phone screen

- mouse selection that copies over SSH, and it plays well with multiplexers like herdr and rex

- 16 built-in themes with a live picker, and you can add your own themes that build on any of them

- extensible through renderer plugins in any language; ships with two experimental ones: Markdown diffed as rendered text, and Mermaid diagrams drawn in the terminal

- --json output and an MCP server, so scripts and agents can read a diff a page at a time

- settings in a plain config file for your dotfiles, remappable keys, and it remembers your layout between runs


r/git • • 11d ago

I built a cross-platform Git client called Tributary

0 Upvotes

I wanted to build a Git client that is free, open source and accessible to everyone, without compromising on features.

The result is Tributary, a Git client for Windows, macOS and Linux.

Some of its features include:

  • Visual commit graph and repository history
  • Git LFS and file locking
  • Visual diffs for images, 3D models, audio and video
  • GitHub and GitLab pull request management
  • Features aimed at game development and projects with large binary assets

It's free, open source and available under the MIT licence.

GitHub: https://github.com/shikoko/tributary

I'd love to hear what you think, particularly from people who regularly work with Git or have experience with other Git clients. What would you like to see in a tool like this?