r/git • • 5h ago

How do you resume a 12 hour fetch

8 Upvotes

Some muppets, AOSP, decided to put their tools in a repo. The packed file is around 100G. How do you resume a fetch without re-downloading the whole pack files again using git fetch?

I guess I could download their entire pack for the whole repo using https, and you offsets in http, but having a few 10s of G of pack files because the network outage is a bit annoying.


r/git • • 8m ago

Should Git already look beyond SHA-256?

3 Upvotes

Git selected SHA-256 back in 2018. With Git 3.0 approaching, some recent developments make me wonder whether that decision deserves another look:

SHA-256 isn't broken, but given how long the migration from SHA-1 has taken, should Git be considering alternatives like SHA3-256, SHAKE256, KT256 or even longer hashes?

Or is SHA-256 still the most sensible choice, with cryptographic agility being the bigger priority?

Curious what others think. Has there been any recent discussion among Git maintainers about this?


r/git • • 2h ago

Watch your Git history grow in the browser: I ported Gource to WebAssembly & WebGL2 (supports both public URLs and local private repos)

2 Upvotes

Hey r/git,

I’ve always loved using Gource to watch how a repository's directory tree and commit history evolve over time, especially around the end of the year. However, setting up native binaries, graphics dependencies, and video encoding pipelines every time I wanted to render a quick visualization was always a bit of a hassle.

And now, Gource Online is the easiest way to use Gource!
It's a open source browser-based port of Gource powered by Rust, WebAssembly, and WebGL2.

How it works:

  • Public Repositories: Just paste a GitHub or GitLab URL and hit play. it fetches and visualizes the commit history directly in your browser.
  • Private / Local Repositories: If you don't want to upload your source code or grant OAuth permissions, there is a lightweight CLI helper that extracts only the necessary commit metadata locally and feeds it into the browser visualizer.
  • In-Browser Video Recording: Ported Gource's recording workflow directly into the UI so you can export videos right from the player without wrestling with `ffmpeg` pipes.

It’s still in Beta, and I'd love for you to throw some of your own repos at it, especially larger ones with deep commit histories, to see how the parser and WebGL2 renderer hold up on your machine.

Link: https://gource.online/


r/git • • 1d ago

Schlorp - A Git GUI that makes everything better

Post image
925 Upvotes

I made a Git GUI that does everything better by adding extra steps to every command. Installing it is very simple. You simply run make and it will automatically install 6000 dependencies. It's called schlorp because I wanted a name that reflects the unique nature of the program.

The code is 100% opensource, and to make it easier to audit, everything is in a single commit with 75000 lines of code.


r/git • • 20h ago

Few questions about Conventional Commits

5 Upvotes

The first question is about splitting commits. Let's consider an example: I want to implement several features, such as adding commands: command 1, command 2, and command 3. All of these commands require an interface. Should this interface simply be included in the commit with command 1, or should I first make a separate commit for the interface and then separate commits for the commands?

In the first case, the commit ties command 1 to the interface. And if, for example, I want to revert that command later, all the other commands will break. That's why I don't really like this approach. However, maybe I just don't understand the concept properly, and doing it this way is actually fine?

In the second case, the first commit turns out to be purely preparatory, which makes it unclear what type to use for it. It's not feat, since the API isn't changing, and it's not refactor, since new code is being created. Does that mean I have to invent my own type?

I haven't really found any discussions about this online, so I assume either few people bother with this, or I'm misunderstanding something about Conventional Commits.

The second question is about commit size (and might be indirectly related to the first question). Suppose I'm building a fairly large feature, say around 300 lines of code. Is it normal to have such a huge commit? It seemed to me that making smaller commits is the better practice. If I split this commit into smaller ones, the question arises—how should I divide it? (which partly relates back to the first question).


r/git • • 49m ago

I got tired of my portable Git setups breaking when drive letters changed, so I built GitShift: a multi-profile Git manager with a 2FA encrypted SSH/GPG vault.

Thumbnail gallery
0 Upvotes

Hey everyone,

For a long time, I managed multiple projects by keeping separate portable Git setups. The problem? Everything relied on hardcoded absolute paths, so whenever a drive letter changed (like D:\ becoming E:\), my Git configuration completely broke. On top of that, constantly opening and switching between different Git instances depending on which project I was working on got exhausting.

Instead of keeping a private workaround just for myself, I decided to build a proper multi-profile manager and release it as open source under MPL-2.0: GitShift.

What I'm building:

  • 1-Click Profile Switching: Keeps your Git user/email, SSH keys, and GPG signing keys completely isolated per profile (Work, Personal, Freelance) without fragile global paths.
  • Encrypted Key Vault (with 2FA): Stores your SSH/GPG keys encrypted locally instead of leaving plain files scattered around. Supports master password, OS biometrics, PIN, or hardware keys (YubiKey / FIDO2) — and lets you combine two methods as 2FA.
  • Integrated Workflow: Includes a Monaco-style diff viewer, a quick "Open in VSCode" button, and an embedded Git-only terminal that automatically inherits your active profile.

Current status: I just finished the interactive UI design/wireframe and set up the repo, and I'm starting the Electron + React + Vite build now.

GitHub repo: https://github.com/hacko223/GitShift

Before I lock in the architecture, I'd love to hear your thoughts—what's your biggest pain point when juggling multiple Git accounts or SSH/GPG keys?


r/git • • 6h ago

A video file I couldn't include in the commits because it was too large, is now gone as of turning on my computer.

0 Upvotes

I was putting a school project in a github repository so i could sync my laptop and pc and have the same files on both, but the video was too large so every time it would be included i'd have to hit 'discard changes' on that on the github desktop app.

now the issue i'm having is that when I turned on my computer and opened up the files for the project, the video was gone. I have no idea how this happened as.. well it was there last time I had the computer on im pretty sure. or at least last time i was using those files.
The video isn't in my trash either btw. Im also using linux mint.

so.. i had a similar issue yesterday but was able to resolve it by using $ git reset --keep HEAD@{3} but after i got that fixed i ran into issues again because there were other things I still needed in that repo so i pulled again and the video disappeared again i think. so i did it again and then copied the video to make sure it was safe, then i cloned the repo into the thing again, merging all the files together. the video was in there and so i deleted the copy.

...i think it might be because I merged the folder yesterday? did.. did git like.. replace the folder when i turned on my computer today instead of merging the folder? why was git even doing anything @w@

please help. i need that video and have no idea why its gone or where it went.


r/git • • 10h ago

support post-quantum encryption

0 Upvotes

NSA advisory about changing to post-quantum encryption. Does git have anything specific for ssh we can use to comply? Also, since I use github, I hope they are on the same page with it.

Thanks.


r/git • • 1d ago

code.opensuse.org shutting down

Thumbnail lwn.net
0 Upvotes

r/git • • 1d ago

How often should I commit my changes?

9 Upvotes

I am fairly new to programming and git and I was just wondering how often I should commit my changes both locally and to Github? I feel like I'm doing it to often


r/git • • 1d ago

I built a "Spotify Wrapped" for my Git history.

Post image
0 Upvotes

I spend most of my day in Git, so I wanted to know what my year actually looked like. I added a small year-in-review to the Git client I've been working on, and this is my card.

It only reads local Git history, nothing else (no GitHub API, no diffs uploaded anywhere).

  • It walks every local and remote branch of the repos you pick, keeps your own non-merge commits for the calendar year, and dedupes commits that show up in several clones of the same repo.
  • Hours use the author's own timezone offset from the commit, not the machine's. My 4 PM peak is really 4 PM where I was.
  • For the "latest commit", the day wraps at 5 AM, so a 3 AM commit counts as a late night, not an early morning.
  • Main language comes from name-only tree diffs (file extensions, ignoring lockfiles and generated stuff). It never reads patch contents.
  • Teammates come from authors and Co-authored-by trailers, with AI tools and bots filtered out.

Curious what other people would want in something like this.


r/git • • 3d ago

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

Thumbnail bufferoverride.com
0 Upvotes

r/git • • 3d 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 • • 4d ago

Enable or disable merge.autoStash and rebase.autoStash?

8 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 • • 3d 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 • • 3d ago

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

Post image
0 Upvotes

r/git • • 4d 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 • • 4d ago

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

Thumbnail reddit.com
0 Upvotes

r/git • • 4d 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 • • 4d ago

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

Thumbnail github.com
0 Upvotes

r/git • • 4d 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 • • 6d ago Mindblown

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

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

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

11 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 • • 6d 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.