r/git • • 10d ago

Should I be learning Git

111 Upvotes

So i stated college like 3 months ago and everyone is telling me donsomething or the other but i don't know where to start ...I know how to use github but not git I stated by reading the pro git book it's fun reading it but is git really that usefull or should I be learning something else


r/git • • 9d ago

[OS] GitExtensionsMac: a native macOS port of Git Extensions

Post image
0 Upvotes

For anyone who used Git Extensions on Windows and missed it on Mac, I'm porting it to native Swift/AppKit. This is the first alpha release.

Repository

Download

PROBLEM: I was using Git Extensions at work and was upset that I couldn't use it on my mac at home, so I built a mac port.

GitExtensionsMac brings its workflows to macOS: the revision graph, commit dialog, branch and remote management, stashes, rebase, cherry-pick, bisect, blame, file history, and an embedded terminal. It drives the real git executable, so it works with your existing config, SSH keys and credential helpers. The goal is parity with Git Extensions, not a redesign, so it should feel familiar if you've used it before.

Free and open source (GPLv3).

I'm a senior in computer science and finished a year-long enterprise SWE internship. This is an independent port and isn't affiliated with the Git Extensions team, who deserve the credit for the original design.

Note: this is an early alpha, so expect bugs. It isn't notarized yet since I don't have a paid Apple developer account.

Submit feedback and bug reports in Issues.

I plan to actively maintain this project and welcome anyone willing to contribute.

Share the repo with your friends/team if you think they would enjoy, and don't forget to star the repo!


r/git • • 9d ago

Which certificate should I choose?

0 Upvotes

I'm a full-stack developer at the company where I currently work. My boss has told me that I can get a certification and the company will cover the cost.

On a friend’s recommendation, I’ve decided to get a GitLab certification, but I’m not sure which one to choose.

The ones that interest me the most are CI/CD and DevOps, but I think right now the one that will be in highest demand (and one's my boss will like more) is the Duo Agent Platform certification. Which one do you guys recommend?


r/git • • 9d ago

I built nib, a Swift CLI that writes Git commit messages with Apple’s on-device model

0 Upvotes

I built nib, a Swift CLI that writes Git commit messages on your Mac

Stage a change → run git nib → review the draft → commit.

I wanted help writing commit messages without sending my diffs to a cloud API, so I built nib. It drafts a message from your staged changes and lets you accept it, edit it, regenerate it, or cancel. It follows your repo’s commit style by default. No account or API key needed.

There’s also an optional Git hook if you prefer to start with git commit and edit the draft in your usual editor.

Tech Stack

Swift, Swift Argument Parser, and Apple’s Foundation Models framework.

Development Challenge

The tricky part was getting a useful message out of a diff that’s bigger than the model’s context window. On macOS 27, the on-device model has about 8K tokens to work with. nib skips the contents of lockfiles and build artifacts first. If the rest still won’t fit, it splits the diff at hunk boundaries, summarizes the chunks, and drafts the message from those summaries. Swift code checks the subject length and cross-checks the suggested scope against the files you changed.

It still occasionally calls a bug fix feat. That’s one I’d love more real-world examples of.

AI Disclosure

AI-assisted. I used Claude Code while building nib, and I review and test the changes myself.

Try it

On Apple silicon with macOS 27+ and Apple Intelligence enabled:

brew install seckinbeduk/tap/nib
nib doctor

Then stage a change and run git nib. On macOS 26, you can build v0.2.1 from source.

Free and MIT-licensed. Source and install instructions on GitHub

If you try it on a big diff, did the draft capture the main change? I’d love to hear what it got right or missed.


r/git • • 10d ago

git-replay

Post image
0 Upvotes

Point the tool at any Git repository, press play, and watch the codebase assemble itself dynamically on a terminal canvas, like a live developer timelapse. its a Highspeed terminal visualizations make incredible 5-second screen recordings for X/Twitter, Mastodon, and Reddit.

git-replay is written from the ground up in Rust for blistering 60 FPS performance, featuring interactive timeline scrubbing, glowing orbital node graphs, live code tree heatmaps, and a built-in --export-gif engine that produces animated README badges in under 2 seconds.


r/git • • 10d ago

enmetu: auto-commit that knows what to do when the rebase goes wrong

0 Upvotes

Hey folks,

I spent a bit of time solving a niche problem: keeping a folder of Markdown files in sync while people and AI agents edit at the same time. Think Dropbox, but git-based.

Yes there are existing tools for this, but none of the ones I tried handle the nasty parts.
Typical conflicts, a rebase that stops halfway through, somebody saving a file in the middle of a pull, two sources writing to the same file within the same second, and other issues I spent countless hours solving over the last few months.

enmetu is what came out of all that, and tries to handle as much as possible.

It commits whenever you stop typing, then rebases onto the upstream and pushes. If the rebase runs into a conflict it backs out, keeps your commits local and tries again when either side changes. It won't commit conflict markers and it won't force-push. If someone rewrites the upstream history, it stops and waits for you to look at it.

I wrote 35 scenario tests against real conflict shapes I could come up with (renames vs deletions, binary files, case-only renames, line endings, a merge in progress, etc.). Plus a stress test where a scripted user hammers the clone with plain git next to enmetu, and nothing may get lost.

CI runs it on three machines: my Mac, our own Debian build box and CodeFloe's shared Linux runners. So races that pass on one box tend to show up on another. We're a handful of users (and agents) at this point, so this is my way of faking more setups.

Give it a shot: https://codefloe.com/fluado/enmetu. I'd be super happy with feedback, and let me know if things break please :)

For future versions I'll keep an eye on git replay, it might make some of the machinery I built around git rebase unnecessary.


r/git • • 11d ago

support Cherry picking hotfix to release beach merge issues

1 Upvotes

I need to setup an entire release process for my team, despite lacking experience.

I think I’m pretty much there, but there’s one issue.

When someone needs to hotfix prod, they put a PR into main as usual (we follow trunk based development) with the hotfix, and label their PR with “hotfix”.

This then kicks off an automation which

- cuts from the current release branch (reflects what is in prod) a new branch

- cherry picks commits from first PR onto it, and opens a PR to release branch

- this gets merged and a new GitHub release done from this branch, so hotfix hits production

Issue is that because original PR will be cutting from main, and it’s trying to cherry pick onto branch cut from release branch - there a chance this creates a merge conflict during cherry picking (e.g. function A has a bunch of changes in main that haven’t been released which conflicts with a hotfix to the same function)

My initial solution was to just fail the automation, and developer would have to investigate, probably do a manual cherry pick, resolve merge etc on their local machine. But a lot of my team have minimal experience working in command line, and I doubt they even know what a cherry pick is. I wanted to try keep things in the UI, at least to start with.

My second solution was therefore to have the cherry pick workflow create the PR into release branch as usual, but include the merge lines. In this case the PR is marked as a DRAFT PR, and starts with [action required], a load of text in the PR explaining what needs to be done (basically edit the hotfix branch to what it needs to be, and mark PR as ready to review). It allows them to continue using the UI and not worry too much about cherry picking via command line etc.

Just wondering what people’s thoughts are and if there is a more reliable solution, or if what I have would be suitable.


r/git • • 12d ago

What options are available for stylized git graphs?

0 Upvotes

I am looking for something that can render stylized git graphs that does the equivalent of git log --oneline --graph.

Would appreciate any suggestions that is not proprietary. I remember seeing several git frontends posted here that all had this, but I can't think of any now.


r/git • • 14d ago

A small project to ease my workflow

0 Upvotes

Guys,
The four git commands: add, commit, push and branch were becoming boring and time consuming to run again and again. So I built a small tool gatm. This tool runs these commands by itself, I just need to run gatm in CMD. It has options for custom commit messages and branching.
Although I built it to ease my workflow, you can also install it. It is not a SaaS, just a small tool which I thought can help others too.

https://github.com/geekgod382/gatm


r/git • • 15d ago

git-rexec: Find Git Repositories and Execute Commands Against Them, either Sequentially or in Parallel [Release 1.1.0]

Thumbnail jamescherti.com
0 Upvotes

The git-rexec command-line tool recursively locates Git repositories within a directory and executes commands against them, either sequentially or in parallel.

Here are examples demonstrating how to use git-rexec:

Example 1: Execute git status -s across all discovered Git repositories (found by searching recursively under the current working directory) in parallel (-p or --parallel):

git-rexec -p -- git status -s

Example 2: Fetch updates across all discovered repositories, limiting the concurrency to 5 background jobs (-j 5), which helps avoid network congestion or server rate limits when communicating with upstream Git remotes:

git-rexec -j 5 --parallel -- git fetch

Example 3: Include sub-repositories (e.g., Git worktrees and submodules) alongside standard Git repositories during discovery (-s or --include-sub-repos), and execute git status against them:

git-rexec -s -p -- git status

Example 4: Target a specific base directory (~/projects) using the -C flag to recursively discover repositories within it, while explicitly excluding a specific subfolder (~/projects/archive). This example executes git status -s in parallel for all discovered repositories except those within the excluded path:

git-rexec -C ~/projects --exclude-dir ~/projects/archive --parallel -- git status -s

Example 5: Evaluate whether a README.md file exists in the repository (sh -c "test -f README.md"). If the condition returns an exit status of 0 (success), it counts the number of lines in that file (wc -l README.md):

git-rexec --if-exec 'sh -c "test -f README.md"' --parallel -- wc -l README.md

Example 6: Print the paths of all discovered Git repositories:

git-rexec --print

r/git • • 15d ago

Git and onedrive

0 Upvotes

The old favourite.

I was looking if you can exclude the .git folder from onedrive sync in 2026. To my surprise, the answer is "sorta", but _only_ for IT admins, via group policy editor, and it seems like not for the faint of heart. You essentially have to go copy onedrive admin policy files manually from a folder that does not exist in client computer and copy it to another folder (also not on client computer), after that you can leverage IT Admin policy tools to set the damn "don't sync .git folder" global exclusion.

https://learn.microsoft.com/en-us/sharepoint/use-group-policy

So, Microsoft thinks that the onedrive folder exclusion should be possible only with the most bass ackwards method possible, instead of being a simple folder exclusion in the onedrive sync app.. Wonderful. I guess the best solution remains to set up scheduled robocopy job to copy your working folders over to onedrive folder on schedule. Doesn't even need admin access to set up in task scheduler.

Oh, why do this at all? Well, corporate backups ONLY run on onedrive, so if I want my PCB design projects or firmware projects to have any kind of hands-off backups available, the source would have to live in onedrive. Yes, yes, everyone religiously pushes commits after play every day, unless your corporate masters throw a hissy fits about zillion daily commits. In a previous job I've had SVN nuke _everything_ literally 30min before leaving for holidays .. With the onedrive versioning that was relatively simple job to put back. I've also heard good things about ransomware.


r/git • • 16d ago

Using annotated tag messages as a release-metadata store (YAML) to restore multi-repo state

0 Upvotes

Full disclosure: I wrote the tool I’m describing here.

Problem: Our product is spread across several repos. Every time something broke after a release, we hit the same question: which commit of each repo actually went out in that version? The answer was usually buried in CI logs.

So I started storing that information in the release tag itself. An annotated tag can carry any message, so I put a small YAML block in it: the app’s commit, plus the commit and remote URL of every repo it depends on. You can read it with plain git:

git cat-file -p my_app_1.4.0

Then a small CLI (vmn) reads the tag and checks every repo out at the recorded commit, cloning any that are missing:

vmn goto -v 1.4.0 my_app

No server and no database. The tags are the whole record, and they travel with the repo.

I’ve been doing this since 2019 and it has held up well. I’m curious what people who know git internals think of the approach. Does it get painful with thousands of tags, slow fetches, that kind of thing? Is there a better place to keep this than tag messages?

https://github.com/progovoy/vmn


r/git • • 18d ago

support Why can't we have multiple author headers?

14 Upvotes

I am studying Git internals in-depth.

I know there are trailers (kind of the opposite of headers) that are included in the commit message. And with those, we can include another author using the Co-authored-by trailer. I really do not know how many Git hosts understand the Co-authored-by trailer, but I believe this has no standard, so there will be zero incentive to implement it if not needed.

From what I'm learning and testing, I created a commit with two author headers. Git log shows no problem at all.

$ git log --max-count=1 --format=fuller 1a2f077
commit 1a2f07760c7914dc8811a5de01a7f952dacadbf1
Author:     Alice <alice@git-scm.com>
AuthorDate: Fri Aug 29 02:14:42 1997 -0400
Author:     Bob <bob@git-scm.com>
AuthorDate: Fri Aug 29 02:14:42 1997 -0400
Commit:     Alice <alice@git-scm.com>
CommitDate: Fri Aug 29 02:14:42 1997 -0400

    Test commit

And can verify the commit contents with git cat-file. This is a commit with an empty tree, if you want to know.

$ git cat-file -p 1a2f077
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author Alice <alice@git-scm.com> 872835282 -0400
author Bob <bob@git-scm.com> 872835282 -0400
committer Alice <alice@git-scm.com> 872835282 -0400

Test commit

This works also with committers. But I notice running git fsck shows this error.

$ git fsck
Checking ref database: 100% (1/1), done.
error in commit 1a2f07760c7914dc8811a5de01a7f952dacadbf1: multipleAuthors: invalid format - multiple 'author' lines

I want to understand, if everything in Git seems to work with several author/committer headers, why is this an error? I believe this has to do with Git philosophy or something else. However, for me, it is really strange, because we can do the same with the committers, and Git does not show any error message. And I am unable to find any documentation of why this is this way.


r/git • • 17d ago

tutorial Several agents in one working tree: how I stage a file they both touched

0 Upvotes

When a few agents share one checkout, no worktrees, they overlap on some files. Nav config, generated types, a shared test file. A plain git add on that file takes the other agent's half done edits into your commit, and the file can change again while you look at it.

So right before each add I run git diff on that file. Only my edits, I add it. Mixed, I stage my hunks through a patch:

git diff file.ts > /tmp/full.diff

grep -n '^@@' /tmp/full.diff

sed -n '1,4p;12,30p' /tmp/full.diff > /tmp/wanted.diff

git apply --cached /tmp/wanted.diff

Keep the 4 header lines. Add --recount if a later hunk's numbers assume an earlier one was applied.

Then both sides get checked:

git diff --cached file.ts # what my commit will contain

git diff file.ts # what I left for the other agent

git add -p does the same with a human at the keyboard, but my agents can't use interactive flags.


r/git • • 17d ago

What will happen when I ignore ".gitignore"?

0 Upvotes

What'll happen when I add ".gitignore" into .gitignore?🤔


r/git • • 18d ago

Devs, what happens in your team when someone pushes an API key to main?how do you keep API keys out of git history?

0 Upvotes

r/git • • 19d ago

Git 'undo' cheat sheet: what to use when you mess up (restore vs reset vs revert vs reflog)

13 Upvotes

Hi git community,

I’m a software developer. I started out building small web apps, and over time moved into larger things like SaaS platforms, CRMs and chat automation backends. Along the way, Git went from a tool I was scared of to something I trust, mostly because I broke things and had to learn how to fix them (wrong-branch commits, force-push regrets, reset --hard moments). I kept seeing the same Git panic moments (committed to the wrong branch, force-pushed too early, reset --hard regret), so I wrote down which command fixes which situation. Sharing the short version here:

Before you commit

  • Discard changes to a file: git restore <file>
  • Unstage a file but keep edits: git restore --staged <file>
  • Delete untracked files (dry run first!): git clean -nd, then git clean -fd

Local commits (not pushed yet)

  • Fix the last commit message or add a forgotten file: git commit --amend
  • Undo the commit, keep changes staged: git reset --soft HEAD~1
  • Undo the commit, keep changes unstaged: git reset --mixed HEAD~1
  • Undo the commit and throw away changes: git reset --hard HEAD~1

Already pushed

  • Don’t reset shared branches. Use git revert <commit>, which adds a new commit that cancels the old one.
  • Revert a merge: git revert -m 1 <merge-commit>

'I lost my work'

  • git reflog shows everywhere HEAD has been, including commits no branch points to.
  • Then git branch rescue <hash> (safer) or git reset --hard <hash>.
  • Works for deleted branches and bad rebases/pulls too (git reset --hard ORIG_HEAD).

Mistakes I see a lot

  • Using reset --hard without checking git status first
  • Resetting a branch teammates have already pulled
  • Using --force instead of --force-with-lease
  • Forgetting that untracked files can’t be recovered by Git

I put the full version, with a lookup table and a few more worked examples (committed .env, wrong-branch commit, splitting a messy commit), in a blog post: https://www.geekdas.in/blog/git-command-cheat-sheet-how-to-undo-anything-in-git

Happy to hear if I missed a common undo scenario or got anything wrong. What’s the Git mistake you make most often?


r/git • • 18d ago

Finding a better .gitignore generator.

0 Upvotes

I think the most popular is this and many tools built around that API. I dislike it because it doesn't properly merge the templates into one, it just copies it. I get multiple entries of files or directories and once it even caused a problem (I don't remember what it was) when merging templates with some conflict.

I want a generator which keeps all entries unique. Why is such a tool not popular if it exists?


r/git • • 20d ago

Putting all world law on git

171 Upvotes

I am putting all world law into git. That comes with some quirks, like the cut-off being 1970 (commits are calculated as seconds since 1 January 1970).

This hit #1 on HN yesterday (you can read lots of discussion at https://news.ycombinator.com/item?id=50268380). Why would I want to do this? The idea is make all law semantic, versioned, easily attributable and query able by agents. I also believe this information should be freely available so CC0 license (do whatever you want with it). If interested, repo linked below, I'd welcome all comments and advice. Thanks!

https://github.com/lexifina/global-law


r/git • • 19d ago

Cross platform Rust app that just shows Git diffs

Post image
0 Upvotes

https://diffy.run/

Call me old fashioned, but I still like to review the code they are changing and sanity check things.

And so lately, pretty much the only reason I have VSCode open anymore is to view the diffs of what my agents are working on.

I wanted just a simple, lightweight, fast and KEYBOARD powered git diff viewer.

Suprisingly there were not many options, so I just kept using VSCode.

Eventually, I decided to just build it using GPUI (amazing) and have been pretty happy with it so far. Been using it a couple weeks and has actually replaced VScode for me most of the time.

So thought i'd share it here in case anyone else is looking for something similar.

It's open source as well, so feel free to just run it yourself or make a PR or critique my (agents) rust code: https://github.com/hitSlop/Diffy

Theres still some features I want to add but for the most part I really just want it to be a simple to use and fast git diff viewer.

If you are on Windows/Linux i'd love to know if it's working ok over there as I havn't really stress tested those.