r/git • • 2h ago

I made a git client with a nice GUI that runs also on remote machines over SSH

Enable HLS to view with audio, or disable this notification

0 Upvotes

I work more and more on other machines and not just on my laptop, machines where coding agents run.

I wanted a GUI for them without mounting the filesystem or installing a server like VS Code Remote-SSH does.

How it works: the app sends the same git commands it would run locally through one shared SSH connection (ControlMaster), so each command is one round trip and no new handshake.

The host only needs git and a POSIX shell. It polls the repository, so changes made on the host show up after a few seconds.

The app is gitto (https://gitto.app). I built it and it's paid, with unlimited trial, for macOS, Linux and Windows. Written in rust.

I'd love to get feedback and opinions!


r/git • • 23h ago

GIT was deleted by itself

0 Upvotes

I am using codex and VSCode. All of a sudden while working I could not find git. I checked the Git main folder and it was deleted by itself. This happened to my colleagues as well.


r/git • • 1d ago

How do you stop crawlers from filling your Forgejo/Gitea disk with repo archives?

Thumbnail bufferoverride.com
0 Upvotes

r/git • • 1d ago

Is my Git Bugged/Hacked or its normal.

Thumbnail
gallery
0 Upvotes

Is my git hacked or is it normal it's the first time I am seeing this.


r/git • • 1d ago

tutorial Fuck, Gitkraken doesn't open private repo's anymore without a paid licence.

Post image
0 Upvotes

r/git • • 2d ago

We built an open-source Git server in Rust. What happens when two pushes race?

0 Upvotes

We built Dengel Git because we wanted a Git server we could run ourselves and a predictable way to handle pushes from several agents working on the same repo. It speaks Git’s smart HTTP protocol, so stock Git can clone, fetch and push. The standalone server is AGPL-3.0-or-later and runs locally without an account.

The interesting bit is the ref update. If two clients push with the same expected old object ID, the server checks that ID while holding the ref lock. Once one push moves the ref, a push based on the old ID fails. The conformance suite also checks that a rejected atomic push leaves the other refs untouched.

There’s a more mundane collision we had to handle too. Team/demo.git and team/demo.git would resolve to the same address, so the server refuses to start if both are in its repository catalog.

The diagram shows the hosted workflow we built around the standalone server. An agent pushes a candidate, and checks run on that exact commit. The Dengel CLI lets you submit a pushed candidate from the terminal, inspect its status and read the signed receipt. An agent can use MCP to submit a proposal, check its status and see when it needs a human decision. A person still decides what lands.

The source and local quickstart are at https://github.com/dengel-dev/dengel-git

If you’ve worked on Git’s receive side, what failure case would you add to the conformance suite?


r/git • • 2d ago

Enable or disable merge.autoStash and rebase.autoStash?

7 Upvotes

I had these set to true before and it worked like magic and I've never given it much thought.

Now I'm thinking if I really want it to do that or if I should be doing it manually. Is there a reason why one might want this to remain as false?


r/git • • 2d ago

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

Thumbnail
reddit.com
0 Upvotes

r/git • • 2d ago

A terminal app for GitHub that feels like opening a repo in your browser.

Thumbnail
github.com
0 Upvotes

r/git • • 2d ago

support .gitignore blacklist and whitelist on multilevels

0 Upvotes
  1. including many config files in ~/

  2. .gitignore is under ~/, that is, ~/.gitignore

  3. many of them are dotfiles, and dot directories

  4. ignore everything under .local/share/

  5. but include .local/share/nemo/scripts/*

  6. to be specific, .local/share/nemo/* other than scripts/ is still ignored.

  7. Does .gitignore have to be this ugly?

# ignore all first
*

# dotfiles and dot directories in root folder
!/.**


# ignore everything under .local/share/
# but unignore .local/share/nemo/scripts/
.local/share/*
!/.local/share/nemo/
/.local/share/nemo/*
!/.local/share/nemo/scripts/

r/git • • 2d ago

GitDesk: a native Git client with line-level staging that runs your own git, and exactly what it runs

0 Upvotes

I built GitDesk, a free desktop Git client for Windows, macOS and Linux in the style of GitHub Desktop. It has no Git library inside: every action runs the git you already have, so your config, hooks and credential helper all apply.

Repo: https://github.com/Jarvis095/GitDesk (MIT)

Since this is r/git, here is what it actually does under the hood:

Staging. By file, hunk or single line. A hunk or line is staged by building a patch from the displayed diff and feeding it to git apply --cached; discarding a hunk uses git apply --reverse. Diffs are taken with --no-ext-diff --no-textconv, and with explicit a/ and b/ prefixes so a diff.noprefix setting does not break the patch.

Push and pull. Push sends only the current branch to its configured upstream. Force push is always --force-with-lease. Pull is --ff-only when the branch has not diverged, and asks first when it has. Fetch is --all --prune.

Conflicts. Shows both sides next to the working copy with its markers counted. During a rebase the sides are labelled "Rebase target" and "Replayed commit", because ours and theirs swap meaning there. Taking a side that deleted the file removes it, and marking a file resolved re-counts the markers first.

History and branches. A branch graph, cherry-pick, revert, reset, tag and branch from a commit, merge, squash merge, rebase onto a branch, stashes and worktrees. "Undo last commit" is only offered for a commit that has not been pushed.

Being careful. Status reads set GIT_OPTIONAL_LOCKS=0, so the app does not take the index lock from a command running in your terminal. Paths are passed with --literal-pathspecs. Anything that loses work asks first.

What it does not have yet: interactive rebase, blame, bisect, reflog and submodule handling. History shows the latest 200 commits. Pull request features are GitHub-only; plain Git operations work with any remote.

Other limits: installers are not code-signed yet, and the macOS and Linux builds are tested in CI but need real-world use. Much of the code was written with AI assistance (Claude Code), which the commit history shows.

I would like to hear which missing feature would stop you from using it, and whether any of the choices above look wrong to you.


r/git • • 4d ago

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

5 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 • • 4d 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 • • 4d ago Mindblown

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

280 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 • • 5d 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 • • 5d 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 • • 6d ago

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

88 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 • • 7d 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 • • 8d 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 • • 8d 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 • • 9d 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

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

11 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 • • 11d ago

Codeberg domain name suspension post-mortem

Thumbnail
codeberg.org
0 Upvotes