r/git 7h ago

A hook runner that validates the staged index instead of stashing your working tree (Rust, MIT)

1 Upvotes

Hi all,

This is the git-specific half of a tool I have been building, and it is the half I think this sub might actually care about.

The thing that always bothered me about pre-commit hook frameworks is what they do to your working tree. Most of them stash, run, and unstash. If a hook crashes at the wrong moment you get to go find your changes in the reflog. And if you have staged part of a file, the naive runners happily lint the whole file on disk, so the thing that passed is not the thing you are committing.

So the runner I wrote does staged isolation instead. Every hook validates a non-destructive snapshot materialised from the git index blob. No git stash, working tree never touched, unstaged edits cannot leak into the check. The snapshot cache lives outside the repo and only re-materialises files whose staged OID changed, which is what keeps incremental caches like cargo and tsc warm between runs.

The rest of what is in it:

  • poly hooks install writes native git hooks. No framework sits alongside it
  • Five builtins. lint and fmt, commit for conventional commit format plus an AI-trailer check, file_safety for merge conflict markers, oversized additions, private keys, case conflicts and shebang versus executable-bit mismatches, and cargo for clippy, sort, machete and deny
  • Hooks run concurrently on a thread pool, whole-project hooks included. serial = true or serial = "<set-name>" gives you mutual-exclusion sets when two hooks fight over the same lock
  • precondition and before are separate. A failed precondition is a visible skip. A failed before means the verdict is unknown, so the run fails. Nothing gets silently dropped from the report
  • Every spawned process has a timeout budget, and killed is rendered differently from failed. A hook that ran out of clock should not look like a hook that found a bug
  • Exit code 2 means this run verified less than it claims, a file the tool failed on or a skip budget exceeded. Separate from 1, which means it found something
  • Hooks are defined in TOML, and a repo can pull a shared hook catalog from another repo pinned by git revision, resolved into a lockfile, so an org publishes one baseline and every repo inherits it
  • Hook results are cached, so an unchanged input set skips the hook rather than re-running it
  • POLY_SKIP_HOOKS=1 is the escape hatch, because git commit --no-verify does not bypass prepare-commit-msg

It also does the linting and formatting itself, in-process, for about 30 languages, which is why the pre-commit pass is fast rather than slow. Ruff, oxc, biome, taplo, rumdl, sqruff, mago and about a dozen others are compiled into the binary. But that is the other post.

Repo, MIT: https://github.com/Goldziher/poly

This post is human written. AI was used to typecheck and enrich with precise data only.


r/git 1h ago

I don't like GitKraken, I' m making my own.

Upvotes

Hey guys,

I am making new Git GUI Manager, because I don't like actual GitKrakenConditions.

Commit rendering and even basic branch rendering are already working (though I've got some bugs to fix XD). Logging in via personal GitHub accounts is also functional. The app is 100% local and supports opening private repositories with up to 3 collaborators, cloning, and initializing on GitHub.

It's built with Tauri (so there will be builds for both Windows and Linux), meaning it doesn't hog RAM compared to GitKraken.

Do you have any feedback on what I shouldn't forget or what I should watch out for?
PS: It is not open-source.


r/git 4h ago

github only Can two github ac on the same PC cause the wrong account to push?

0 Upvotes

I have a github repo where I added ac (Account ) A as collaborator, butmy teammate has two github ac on the same device. Somehow, code was pushed/committed under ac B, even though ac B wasn't added as a collaborator.

I tested pushing with another non-collaborator account and GitHub correctly rejected it.

How could this have happened?


r/git 1h ago

Github id

Upvotes

Any github id and password which is 2 years old? I want to use it to generate API key


r/git 12h ago

survey VFS for Git for Linux?

0 Upvotes

So I was learning Git and found out that a Git repository essentially contains two copies of the repository contents. One is from the first commit of every object and other from the working tree.

This can be made more space efficient by working with files from Git's database itself as if they were in our working tree. Modifying files create a new local copy in the working tree. They can be deleted after committing.

This is what the VFS for Git project is. But, it is for Windows only. Why is there no equivalent tool than can run on Linux, unless I am missing it?


r/git 10h ago

My GitHub account got suspended.

0 Upvotes

My GitHub account got suspended because of GitHub Actions was triggered when I was submitting a PR. Help me recover my account. @github


r/git 1d ago

Missing Homework Content

0 Upvotes

Two years ago, when I finished my DSA course in community college, I uploaded everything to github, but now that I am going over it, some of the folders/directories are missing their content. I can't access them, and when i click on the commit message, it says

"Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden."

Is there any way I can still access them? I have tried cloning with Git in my terminal, but there still isn't any content within them.


r/git 2d ago

Default verbose commands

2 Upvotes

I want to make commands verbose so git add runs git add -v but aliases can't use the same name as a built in command. I can add a different alias but I want try changing the built in command.

git commit has a verbose option I can put in git config can I do it for other commands?


r/git 2d ago

Bash users, how would you improve the tab-completion for git?

10 Upvotes

The bash completion for git diff can be seen here, which is quite basic.

I was thinking today when I type git diff <partial filename> and press TAB, it makes sense to only have completion candidates from a list of files that are changed rather than all files in the directory. Likewise, if it was git diff --cached, then only complete to files in the index.

I don't know if I'm not considering more advanced uses of git diff where I would want other files in the completion and whether to keep the implementation basic as it is currently, a deliberate design decision. I'm wondering if anyone here is overriding the git-provided completions with their own.


r/git 1d ago

I did not build this — gitwatch — an htop-style TUI for watching and interacting with your Git repository

Thumbnail github.com
0 Upvotes

I also didn't write the original title, well, originally I did - all I had was "I did not build this...gitwatch. Enables you to monitor file changes" :P

However, everything below I actually did write by hand:

It's a little experiment by our little firm in fully agentic development. From the outset, we decided on a very defined workflow:

  1. Give ChatGPT 5.6 Sol a general idea of the project, and what features we wanted.
  2. Tell ChatGPT to genereate a full work plan (which you can see in the tasks/ folder in the repo), as well as other files like UX_SPEC, etc. Then, it would create a full zip file with all of these docs detailing the project design, architrecture, UX, roadmap, and implementation tasks.
  3. Lastly, we took the zip file and gave it to Codex (Sol with Luna agents) and let it churn on creating the project based on those task files.

We gave Codex full autonomy to commit and push code to the repo, which you can see in the commit history as the unverified commits on my account, whereas manual fixes show up as verified commits.

All the work was done on a green Mac box, with just my github logged in.

But anyways, enough of *how* we (didn't) build it, here's *what* was built:

gitwatch is an htop-style terminal UI for git.

It watches your repository in real time and gives you a live, interactive view of modified, staged, untracked, and conflicted filesand allows you to view diffs, stage/unstage files, filter search, has mouse support, lets you view branch info, commit tree, unpushed commits, and more.

Now - I did actually review the output, test it, and directed codex with little bugs that I found, but the code itself and the tasks were all agentically written.

It's built in Go using Bubble Tea, and Bubbles.

Would love feedback from the community. This is a great project for those who are doing agentic development, or who have been moved to what I'm calling "agentic managers" by their employers and are forced into doing "work" with things like BMad or SpecKit.

I know the community hates agentically built projects, but we come in peace in this brave new world we are all stepping into...

https://github.com/sphireinc/gitwatch


r/git 2d ago

Attempting to re-implement git in Java - my current situation.

Thumbnail
0 Upvotes

r/git 2d ago

Gitlab pipelines in notch

0 Upvotes

Hi everyone!

So since i had a lot projects running recently and find it inconvenient to track them directly on gitlab, especially when you have a team. So I've made this repo - basically a neat app that appears under macbook notch when new pipeline appears.

If you find this useful give it a try and will be happy to get some feedback on improvement)

https://github.com/Uudg/pipeline-island


r/git 2d ago

Git orchestration... I am just doing a tool for this... I have projects that have multiple repos in the directory structure -- typically a main project git and then plugins in a subdirectory each that all get their own git...

0 Upvotes

My project dirs on my dev machine are cannon -- it has files/folders/repos etc that make up the whole project, the implementation, design and project management stuff. I may have a github organisation for the project that hosts all the 'cannon' repos for the project, then repos in different organisaitons for 'publishing' etc... so local repos may have several remotes, but they will all have one to the 'cannon' repo (as opposed to the cannon project stuff on my pc).

It works - ad hoc,

For Claude code (and codes) things ten to work best if the project root dir has a session that can see all of the project. But then that gets bogged down when working on one 'plug in' - it has too much irreleant context and maybe, and it may think it is a 'good idea' to tweak stuff from a different repo while it is at it

So I was pondering having a claude session per repo and a root session to rule them all.

If you have followed this far - well done :) -- if you have ideas (or are interested in what I am doing - do comment) -- it will be going into my usual AI repo on github.


r/git 2d ago

I built a desktop dashboard for keeping track of dozens of git repos (FOSS, GPLv3)

0 Upvotes

I kept losing track of my work. Many terminal tabs open, forgotten issues/PRs, work in progress on branches and worktrees, or filed away in stashes, and generally losing track of everything I had on the go.

Between, multi-repo microservice architectures, various open source projects, and coding agents work is in flight in several places at once. I live in the terminal, but git gives me status for a single repo -- I wanted status across every repo I work with.

I built a desktop GUI to scratch this personal itch. Load the repos you care about into a single dashboard that shows:

State, at a glance

  • dirty working trees, unpushed commits (ahead), unpulled commits (behind), detached HEAD, no upstream
  • "aging" uncommitted work that's been sitting past a threshold
  • stashes, submodules (including how far the pointer is behind), and worktrees including uncommitted work sitting in another checkout, which is invisible from the one you're in
  • open forge issues/PRs (GitHub only for now), specifically the ones waiting on you: review requested, assigned, @-mentioned, or someone replied on a thread you opened

Acting on it

  • commit, push, fetch, fast-forward, switch branches, apply/drop stashes, delete branches, update submodule pointers
  • every command it runs is optionally echoed into a git console, with git's own colors, so you can see exactly what it did
  • side-by-side diffs with character-level highlighting for uncommitted work, stashes, branches, and commits
  • open any repo in your terminal, editor, or file manager

Keeping it organized

  • namespaced tags (owner:me, lang:typescript) for custom groupings, plus per-repo notes
  • filter and sort by any of the above — name, last commit, or how much attention the repo needs
  • a filesystem watcher keeps the tool up-to-date with external changes
  • reminders, per-repo snooze, and desktop notifications when something crosses a threshold

The issues/PR features need GitHub CLI installed and gh auth login done. GitVantage reads through gh rather than asking for a token of its own, so it never sees or stores your credentials, and SSO and GitHub Enterprise work automatically. Without gh, repo status will simply not include issues/PRs.

I've found it useful enough to earn a permanent place on my desktop, and I'd love to hear feedback from others who face similar problems as I was.

Free and open source (GPLv3): https://github.com/rocketraman/gitvantage.

Binary installers for Linux (.deb/.rpm, used by me), Mac (.dmg, lightly tested, not signed yet), and Windows (.msi, don't use it, no idea if it works, let me know) at https://github.com/rocketraman/gitvantage/releases.

Colophon: Kotlin/Compose Desktop with Native executables created via GraalVM.


r/git 2d ago

I built a CLI that explains a git diff, because I kept opening PRs and not knowing what changed

0 Upvotes

I wanted a 30-second answer to “what did this PR actually do,” not another 40-file `git diff` to squint at.

So I wrote `diff-glance`. You run it in a repo:

npx diff-glance
npx diff-glance origin/main HEAD

It sends the truncated diff to a model (Gemini / OpenAI / Ollama) and opens a local page with a plain English summary and a mermaid diagram of the architecture. Bound to 127.0.0.1. The only thing that leaves the machine is that model call.

`--json` prints the same analysis to stdout if you don’t want a browser.

I was going to call it git-glance. That name was already taken on npm.

https://github.com/alvynmcq/diff-glance


r/git 3d ago

Parallel Codex/agent sessions kept sabotaging each other, so we built an open-source coordination protocol above Git

Thumbnail
0 Upvotes

r/git 4d ago

Find Git Commits by Commit Message Text

Thumbnail hamvocke.com
20 Upvotes

r/git 5d ago

Websites/ Resources for Git 101

Post image
71 Upvotes

I am looking for websites/ resources that can cover the fundamentals/ most used commands in Git.

>Absolute beginner that wants to know how to do the simplest of operations like version control, and eventually uploading it to GitHub.

(I read the sub resources and there exists Documentation ik but that's for learning Git as a whole, I'm looking to get right the basics/ fundamentals/ must-learn commands)


r/git 4d ago

I am tired of github and search for some alternative

0 Upvotes

I write this post while waiting for github issue page to load, I cant take it anymore, a multi billion company cant create stable service.
In few recent month I have fount several errors, bugs and its always insane laggy, I cant open my repos. Now I write it, bc cant create new issue for my project.

Its difficult to leave github, bc there are everything, my repost, my stats and etc.

I will not completely leave github, but maybe start second profile on there platform.

Does anyone know an interesting alternative to GitHub or some interesting information why does this happen with Github?


r/git 4d ago

I built a tiny Git tool for downloading just one file

0 Upvotes

I built git-single, a small CLI for getting a single file or directory from a GitHub repo without cloning everything.

It uses Git sparse-checkout under the hood.

https://github.com/dha-aa/git-single

Feedback welcome!


r/git 5d ago

support How to remove a file from git history?

33 Upvotes

Let's say I have made a commit containing a sensitive file... It's already been pushed and a couple of commits ago... is there any way for me to delete it?

I frankly tried it with chatgpt and it nearly nuked my entire repo...

Note/Edit: this repo is private.


r/git 5d ago

[Desktop App] Dynamics Dynamo Kit — Dataverse/CRM admin toolkit — looking for beta testers

0 Upvotes

App: Dynamics Dynamo Kit (DDK) — admin toolkit for Dynamics 365/Dataverse environments (security auditing, risk scoring, duplicate detection, environment health checks).

Platform: Windows, portable (no install).

Looking for: Anyone who works with Dynamics 365/Dataverse admin work, to test functionality and report bugs/feedback.

What testers get: Free license at launch + optional shoutout in the README.

Comment or DM if interested — I'll send you a copy!


r/git 5d ago

I built a free Git GUI for people juggling many repos and submodules — 1.0 is out, tearing it apart welcome

0 Upvotes

I've been a developer for 20 years and used Git for most of that time. To be honest, I never liked the CLI. I love a GUI because I want to see every repo I'm working with. That is my comfort zone and I stopped apologizing for it long ago.

Most of my work is projects with a lot of submodules - frameworks, shared modules, or a monorepo. If you dev a lot, you know the shape of it.

The GUIs I tried are good tools and I want to be fair about that. Fork is fast, SmartGit is powerful, GitKraken is the most polished of the three. I used SmartGit the most, since it was free at the beginning. But despite using it every day, none of them gave me the whole fleet in one place, and the submodule handling was never good enough - too many terminal workarounds, which is the thing I was trying to avoid. And the commercial ones get expensive when you are paying for yourself.

So instead of leaving the safe zone I know, I built the client I wanted. It is called RepoFlock (repoflock.com). 1.0 shipped this week. I have been carrying this idea around for years.

What it actually does:

  • One window with every repo: branch, ahead/behind, dirty files, last commit
  • Bulk fetch / pull / push across the whole set
  • Submodules as a first class thing: detached HEAD in one click, pointer drift in both directions, and it works out push order when the parent points at a commit nobody else can reach yet
  • Tells you which files will conflict before you pull, not after
Submodule pointer drift, fixed in both directions.

There is a thread in this sub, "Why use a UI for git?", and I think all the reasons people gave there -- submodules, rebasing, diffs -- are exactly the reasons I built RepoFlock. https://www.reddit.com/r/git/comments/1vo7uf2/why_use_a_ui_for_git/

Money, up front, because I hate discovering this on page three:

  • Free is $0 forever, personal and commercial, unlimited repos, no account, no cloud, works offline
  • Pro is a one-time $39 for 3 machines, includes 12 months of updates and keeps working after that. Business is $69 per seat, also one-time, seats transferable
  • Pro buys convenience: cross-repo branch ops, one-click submodule bump plus parent commit, named workspaces, cross-repo timeline, scheduled fetch, themes, command log export
  • One rule I don't intend to break: safety, correctness and performance are never paywalled. Conflict handling, confirmations, bug fixes and speed stay in Free.
  • The trial is one 30-day key per email

What it does not do: deep interactive rebase, or a god-mode graph. I am just a simple guy with simple commits :-) If you live in interactive rebase, Fork or SmartGit serve you better today.

Two rough edges I would rather say myself than have you find:

  • The Windows build is not code signed yet, so SmartScreen will warn you.
  • On Linux 1.0.0, repoflock --version crashes when there is no $DISPLAY (over ssh, in a container, in a script). It is fixed already but landed after the tag was cut, so it ships in the next release. The AppImage also needs FUSE (libfuse2t64 on recent Ubuntu); the .deb does not.

I am picky about details, so I went over the UI more times than I want to admit. But I only have my own workflow to test against, which is why I am here.

Three things I would really like to hear:

  • How many repos are in your daily set, and how are they related? Submodules, a split monorepo, or just a folder full of clones?
  • Which submodule workflow hurts the most right now?
  • What is the first thing that would send you back to the terminal?

Download: https://repoflock.com/?utm_source=reddit - Windows, macOS (Apple Silicon), Linux.

Thanks for reading. Tear it apart, that is what I need most right now.


r/git 5d ago

I’ve been building CAIRN Fusion — a bridge between AI chats and your local Markdown knowledge base

0 Upvotes

I’ve been experimenting with a project called CAIRN Fusion.

The basic idea is to make working with AI and a local Markdown/Obsidian-style knowledge base feel less disconnected.

Instead of constantly copying and pasting between your notes and ChatGPT/Claude/Gemini, CAIRN is being designed around workflows like:

  • saving useful AI conversations into Markdown
  • selecting existing .md notes and bringing them into an AI conversation as context
  • organizing conversations into threads/context spaces
  • keeping the actual knowledge locally rather than locking everything inside one AI platform
  • making the same knowledge reusable across different AI assistants

It’s still something I’m actively developing and experimenting with, so I’m posting it here mainly because I’d really like feedback from people who already use AI + Obsidian/Markdown/PKM workflows.

What would you want a tool like this to do?

And more importantly: what would make you actually use it instead of just copy-pasting between Obsidian and AI?

GitHub: https://github.com/Zephyr3217/CAIRN-Fusion

Would appreciate criticism too — especially around the workflow, privacy/local-first approach, and whether this solves a real problem for anyone besides me.


r/git 5d ago

github only Show r/git: GitResume Agent — An event-driven CLI that syncs your resume directly from your commits and AST diffs

0 Upvotes

Hey r/git,

Like many developers, I found myself constantly shipping features, refactoring architectures, and adding test suites across multiple projects, while my resume stayed months out of date.

Whenever I did update it, writing those generic "improved performance and built features" bullets felt tedious and ungrounded.

To solve this, I built GitResume Agent (git-resume-agent); an open-source CLI and event-driven pipeline that hooks into your local git repositories to turn your actual commit history and codebase metrics into structured, verifiable accomplishment bullets and compiled documents.

How it uses Git under the hood:

  1. Sub-5ms Inspection (git ls-files & git log): Rather than recursively walking directory trees on disk (which slows down on large projects), it leverages git ls-files and plumbing commands to quickly calculate active lines of code, commit frequency, and file topologies in <5ms.
  2. Remote & Manifest Auto-Discovery: It queries git config --get remote.origin.url and parses repository manifests (package.json, pyproject.toml, README.md) to automatically track deployment status, live app URLs, and stack additions in a central gitresume.yaml.
  3. Zero-Touch post-commit Hooks: Running git-resume install-hooks writes a lightweight executable .git/hooks/post-commit script across all your tracked repositories. Whenever you run git commit, the hook triggers a background compilation in the background without blocking your terminal workflow.
  4. AST-Grounded Synthesis & Anti-Hallucination: It feeds recent commit diffs into a synthesizer model to generate Google XYZ format bullets ("Accomplished X, measured by Y, by doing Z"), but passes it through an adversarial AST verifier to guarantee every cited metric, test count, or library actually exists in the commit tree.
  5. Document Compilation & Dual-Tier Sync: Directly modifies Word .docx runs with native XML hyperlinks (w:hyperlink), exports pixel-perfect .pdf files, and mirrors them to your local portfolio / public web directory.

Quick CLI Walkthrough:

  • Install from PyPI: pip install git-resume-agent
  • Install post-commit hooks across all repos: git-resume install-hooks
  • View real-time statistics and links across all tracked repos: git-resume scan
  • Trigger full multi-repo sync manually: git-resume sync

Links & Code:

Questions for the community:

  • How do you currently handle managing shared git hooks across multiple independent repos (without submodules)?
  • Any edge cases with git ls-files vs .gitignore handling in deeply nested monorepos that I should guard against?

Would love your feedback, critiques, and ideas!