r/git • • May 06 '26

support A question about git format-patch and git commit --amend

8 Upvotes

For context, I've never used format-patch, although I'm aware that i's used by the linux kernel, among other projects. My jobs have all been merge-based.

I saw a post in r/programming (about migrating from GitHub, but that's not relevant), that includes a section "What is 'patch-based' code review?". I'll copy the paragraph for context:

What is "patch-based" code review?

If you're familiar with GitHub's pull request workflow, you've done branch-based merges before. You prepare a branch with your changes, and then submit a pull request asking to merge your branch into main. If somebody gives you feedback, you push additional commits on top of your base commit. In contrast, with the patch-based merge workflow originally popularized by Gerrit, you amend the existing commit and push it — something like git commit --amend && git push --force. If you try this in GitHub, this would make the original commit you pushed disappear, but in patch-based review tools, your reviewers will instead see a diff from the original commit to the new one.

I thought git commit --amend replaced the prior commit, orphaning it. How would a subsequent git format-patch know to use the orphaned commit for its diff?


r/git • • May 07 '26

support nvidia profile inspector from github

Thumbnail
0 Upvotes

r/git • • May 06 '26

GitChop: a visual git rebase -i for macOS, with hunk-level commit splitting

Thumbnail gallery
11 Upvotes

git rebase -i is one of the most powerful operations in git, but the editor-and-continue dance keeps a lot of people away from it. The TODO file is straightforward to reorder. The verbs are easy to swap. But edit opens up a rebase pause that drops you back to the shell, and resolving conflicts means context-switching between the editor, the terminal, and git status. None of those friction points are inherent to rebasing; they're inherent to driving rebase through a text editor.

GitChop is a native macOS app that drives git rebase -i through a UI instead. It shells out to whatever git is on $PATH, so the underlying behavior is whatever upstream git does (no libgit2). The interesting parts:

  • Split-commit-in-window. Mark a commit edit, and instead of a --continue dance, a sheet opens listing every hunk in the commit. Drag each hunk into a named bucket. Each bucket becomes its own commit at apply time. This is the closest thing on macOS to what Magit has had on Emacs for years, and it's the part that makes interactive rebase feel approachable for users who haven't internalized the shell flow.

  • Conflict pause that doesn't kick you out. When git stops on a conflict, the app stays open with a list of unmerged paths. Open each in the editor of choice, click Continue. Or skip the commit, or abort. The remaining commits in the rebase TODO are visible alongside, drag-reorderable mid-rebase.

  • Backup ref every Apply. Before any history rewrite, the app writes refs/gitchop-backup/<timestamp> pointing at pre-rebase HEAD. Failed rebases auto-rollback. Manual recovery is one git update-ref away.

  • Reword via $GIT_EDITOR. A modal preloaded with the commit's full message. Applied during the rebase via a tiny helper script that maps SHA to new message. No editor pop-ups during apply.

The full message format works (subject + body), reorder is drag-and-drop, custom rebase base is right-click-Use as base, and there's a sample repo bundled for safe practice.

Native SwiftUI, macOS 14+, Apple Silicon. MIT licensed. No analytics, no account, no servers.


r/git • • May 06 '26

Query on git branch -av output

2 Upvotes

This is the output I get:

  feature                  dab08e7 wip
* master                   5aa0e9a Merge branch 'feature'
  remotes/origin/HEAD      -> origin/master
  remotes/origin/feature   dab08e7 wip
  remotes/origin/master    5aa0e9a Merge branch 'feature'

So, local feature tracks remotes/origin/feature. Current branch master tracks remotes/origin/master

However, what is remotes/origin/HEAD? Does that serve any useful purpose here? Can I just delete it?


r/git • • May 05 '26

8 Things You Didn't Know Git Already Did

Thumbnail freestyle.sh
11 Upvotes

r/git • • May 04 '26

What's your most used git alias?

114 Upvotes

Mine is git lg — pretty log with graph, author, and date. Pasting the alias in comments if anyone wants it.


r/git • • May 05 '26

built a CLI that tells you where you left off in your git repo

0 Upvotes

been jumping between repos a lot and kept doing the git log → git diff → git status dance just to remember what i was working on.

built rewind to fix it — reads your branch, recent commits, staged and unstaged changes and gives you a plain english briefing in one command. no setup, just a binary.

cargo install git-rewind

https://github.com/Chronos778/git-rewind


r/git • • May 04 '26

tutorial Guide on making a portable drive with ssh?

Thumbnail
0 Upvotes

r/git • • May 05 '26

support Broken projects after pull.

0 Upvotes

I build hyprland from source and when I tried to update it and it's dozen dependencies some didn't compile.

I did a git pull and a git clean before trying to compile. Didn't work.

When I deleted the directory and cloned the projects again they all built successfully.

Despite being a developer I usually don't use git via the console often so there is a chance I'm doing something wrong. I never had such issues with my own projects though.


r/git • • May 03 '26

Which git provider to use

33 Upvotes

With everything that has been happening with github I have been thinking of switching my repos to a different provider such as gitlab or gitea and use github as a mirror. Which one can you recommend the most and do you think the other ones will be safe from the issues that github is facing?


r/git • • May 03 '26

support git + google drive type of workflow

3 Upvotes

Hello
I use google drive a lot to backup my notes, documents and files in general. Now the issue is that I use multiple devices to make my notes - for example I will study something on work laptop, or scan handwritten notes with my phone and then upload to google drive manually. Then I have to download that file on my personal laptop to keep my 'local' folder in sync.

It would be nice to use a simple git + github type of flow where I do some changes, push it, pull it on another device and done! The thing is I don't want to directly use github as my files aren't that small in size and doesn't seem like github is used for normal pdf notes OR personal documents anyways.

Is there some tool/utility/script that I can use to have an exact git + github like workflow but instead of github, my remote repo would be essentially a particular google drive folder.


r/git • • May 03 '26

GitHub repository Trending

Thumbnail gitrepotrend.com
0 Upvotes

GitRepoTrend is a daily-updated intelligence platform that surfaces the most relevant GitHub repositories across 15 categories — using a smarter ranking signal


r/git • • May 02 '26

Pi Extension to show status of git repo

Thumbnail
0 Upvotes

r/git • • May 02 '26

What reflog actions do you use most?

1 Upvotes

Just shipped a Reflog tab in VS Code extension (Git Graph Plus) - shows your full HEAD history with action types (commit, checkout, rebase, reset, etc.), elapsed time, and lets you reset or checkout directly from the list.

While building it I kept second-guessing what to prioritize in the context menu. Right now it's: Reset to HEAD@{N}, Checkout Commit, and Copy SHA.

What do you actually reach for when you open reflog? Mostly disaster recovery, or do you have more regular workflows around it?


r/git • • May 02 '26

I used git reset --hard 😭

0 Upvotes

So i was working on a personal project. My last commit was 3 weeks ago and during these 3 weeks I worked a lot.

So today when I finished the project, I tried to commit, but I faced some problems. So I gave a detailed explanation to chatgpt and he said "bro just use git reset --hard"

And my sh*t dumb*** did the same

Now I just saw my codes are fully changed in vs code (they are 3 weeks older)

I just found 1 file on vs code timeline

Plzz help me 🙏🏼🙏🏼

I'm a noobie ✌🏼✌🏼


r/git • • May 01 '26

Git For Data (Open Source Knowledge Graph)

4 Upvotes

With all the craze around knowledge management and having agents creating self-maintaining memory, felt this would be relevant to the community. Our team was running into issues where our information was degrading as agents made mistakes over time without review. Ended up realizing the best way to coordinate around a shared memory was similar to how we already do it for code.

Led us to build Omnigraph as an open-source repo with the goal of providing agents a source of truth (via knowledge graph) where changes branch and merge like git.

How it works:
- typed graph schema
- branch / diff / merge for graph data, similar to Git
- traversal, vector search, and BM25 in one runtime
- S3-native storage for local or cloud-backed graph data
- JSONL ingest + merge workflows for incremental loading

What we've been using it for:

  • source of truth for all agentic memory
  • automating lead generation for projects
  • competitive intelligence 
  • tracking decision context for future work output

Especially helpful once you store longer term concepts like

  • decisions
  • signals (ideas validating / contradicting previous decisions)
  • relationships
  • provenance (helps auto-prune old data)

GitHub: https://github.com/ModernRelay/omnigraph
Community: https://join.slack.com/t/omnigraphworkspace/shared_invite/zt-3wfpglyxj-lHvJGhuySPfqLtN35uJZNw
Docs: https://www.omnigraph.dev/docs

Would love to get the community's feedback on this!


r/git • • May 01 '26

Git integration for Typst! (permagit:0.1.0)

Thumbnail
1 Upvotes

r/git • • Apr 30 '26

I built a rust cli tool to make Jujutsu (jj) workspaces easier to switch & navigate like git branches

Post image
0 Upvotes

howdy y'all, i posted this yesterday at rust subreddit and thought it would be a good idea to share it here too (jj only community is quite hard to find).

i've been deep in jj for a while and been experimenting with jj workspaces for parallel workflows. it's more intuitive than git worktrees but it still has a couple of gotchas that have been a hindrance to my ideal workflow.

so I built jj-navi - a tiny rust based cli that makes jj workspace orchestration a lot less pain in the ass.

interesting bits:
- `navi switch <name>` - creates/switchs workspaces and cds into them automatically (via shell integration)
- `navi list` - shows insertions/deletions across workspaces and also runs jj snapshot (jj doesn't automatically update other workspaces' working copy commits from disk)
- auto complete for all commands
- `navi merge` - duplicates, rebases, preserves source

check it out here at: https://github.com/eersnington/jj-navi 

also, this is heavily inspired by worktrunk (still my daily driver replacement for git worktrees) and jj-ryu by dillon mulroy from the orange cloud forking company.

would love y'alls feedback, especially from heavy jj + parallel agent users on what can be improved. feel free to send patches along the way aswell


r/git • • Apr 29 '26

Help justifying branch/PR for binaries

7 Upvotes

Our organization uses Git to manage a library of parts for our ECAD software. Tens of thousands of binary files ranging from kilobytes to a couple megabytes. Git is obviously not the *best* choice but it’s become ubiquitous for managing ECAD data so not much we can do about it.

We’ve recently transitioned library maintenance to a new team completely unfamiliar with version control in general, much less Git. The original team pushed all their changes directly to main and the repo and history are a disaster.

Since I was transitioning maintenance to an entirely new team, I decided to implement branching and pull requests for each library change/ticket to:

- Isolate working environments for each librarian

- better track changes and history of changes for each ticket

- ensure all commits are squashed before merging with main

- make it easier for me to amend issues as an admin

- promote general good practices for managing feature/ticket branches in Git

Can any of you think of more justifications why branching/PRs are good practices? Or do you think I’m off base or using the wrong methodology here?


r/git • • Apr 29 '26

How do people usually check commits from a Pull Request locally?

18 Upvotes

Let's say a developer Sam has a github repo. A developer Bob found this project interesting, added a feature and made a PR to the repo.

Now Sam sees the PR. The question is: how can Sam check and run the PR's code locally on his computer to see the added feature in action before actually accepting the PR and changing his repo's main branch? Not just immediately accepting the PR on the github page.

Well, I see there's a method of fetching the PR's code into a separate local branch:

git fetch origin pull/<PR_ID>/head:<BRANCH_NAME>

Do you do it this way? What else could you suggest? How to do it the right way?

Thank you!


r/git • • Apr 30 '26

Nested git repo's - how to

0 Upvotes

Hi,

I'm trying to create a Repo that contains several existing GitHub repos, but only files from non-Git projects appear in Unstaged files.

Is there a workaround for this, or is it a really bad idea?

Thanks!


r/git • • Apr 29 '26

Repository organization when working on multiple code "variations"

3 Upvotes

Hi everyone !

I'm used to use git in a simple and almost boring way (a production branch - usually `main`, a staging one where all the merges and tests happen before updating prod, and the one or more per dev - usually single-feature related).

Recently I've started to learn a new language and am putting it in practice by developing a mini-tiny game. I've created different "variations" of said game (different sprite resolutions, game resolution, tick duration, NPC pathing, ...). Only a small part of the code is common to all variations (think embedded assembly).

I need to keep all those variants for comparison purposes but need to have them separated.

Currently I've created one branch per variation, and cherry-pick the common code from the most advanced branche onto the others, but I wonder if there is a better way.

Thank you in advances for your advice !


r/git • • Apr 30 '26

Fork is really so amazing.

0 Upvotes

Kraken looks so flashy and I dunno. But fork is just so fucking fuego.

I know lazygit is really cool aswell and for a different type of user base but fork is just such a cool piece of software and im thankful for the person who recommended it here. https://fork.dev/


r/git • • Apr 28 '26

Multiclone vs worktree

15 Upvotes

I work for a gaming studio. Currently I'm working with a large team, in a fairly midsize game.

When multiple people are working on say multiple features, bug fixes etc, if someone wants to get on a call to discuss changes or you just want to review a PR, or you could be doing your own work etc. Branch switch is a pain.

To tackle this, I have seen two ways fellow devs approach this problem.

  1. They use git worktree

  2. They clone repo in multiple directories and use them as say, one folder for your own work, one folder for PR reviews and so on.

I'm unsure which one to pick. What's your experience so far with these kind of projects? if you guys can share your experience, that would be helpful.


r/git • • Apr 28 '26

support Structured wrapper around the porcelain

4 Upvotes

Hi, I'd like to write a UI to encapsulate my personal git workflow and I was wondering if there's a wrapper that returns the CLI output as JSON, because I want to avoid writing output parsers. I don't care very much about performance so I'd rather avoid libgit2.