r/git

▲ 0 r/git

How to prevent .gitignore from being tracked itself

This sounds stupid but it's driving me crazy, I'm new to working collaboratively with git.

I'm using VS code to work on a project hosted on github. Git will always track the .gitignore file itself and therefore my remote `main` on github always shows me as being one commit ahead of the project I forked, which then is always prompting me to make a pull request of course

Has to be something simple I'm missing

reddit.com
u/ryancnap — 4 hours ago
▲ 1 r/git+1 crossposts

Built a small CLI to manage multiple git accounts on one machine — would love feedback

Not promoting anything — it's free, MIT, no strings. Just want real feedback.

Managing work + personal git accounts by hand kept biting me (wrong email on commits, ssh picking the wrong key). So I built git-wardrobe — one command sets up an account (key, ssh config, per-folder identity), and a doctor command audits your whole setup and tells you what's silently broken.

I tried the existing tools first — most stop at switching your gitconfig. This one handles the ssh side too, which is where things actually break. Might genuinely be better than what's out there for this — you tell me.

https://github.com/isinghsatyam/git-wardrobe

Would be happy if it helps any of you. If you try it and something feels off or confusing, tell me — honest feedback is exactly what I'm after.

reddit.com
u/isinghsatyam — 7 hours ago
▲ 1 r/git+2 crossposts

Stacked PRs are a cult you shouldn't need a PhD to join. I built Cairn so juniors stop fearing them and seniors stop babysitting a Jenga tower every merge.

Stacked PRs are great (in theory). Small changes, fast reviews, no mega-PRs that reviewers approve without reading because life is short.

In practice? Terrifying. You're rebasing chains of branches, retargeting bases mid-merge, and one wrong keystroke drops you into git archaeology at 5pm on a Friday.

Juniors bounce off them. I know because I watched myself bounce. Drone shot, from above, me at 2am wondering why my PR was suddenly targeting a branch that didn't exist anymore. Seniors know how to do it, they just also know how slow it is when someone merges to main under their feet and the whole chain needs redoing.

So I (with a little help from my friend) built Cairn. Keyboard-driven TUI for reviews, stacks, and the whole PR rodeo. Works today. And no, you don't have to sell a kidney to use it. https://github.com/dotnetemmanuel/Cairn

The idea: git-town owns the scary rebase math, Cairn is the cockpit. Zero hand-rolled rebases in the codebase. On purpose.

Your board splits into tabs: My PRs, Needs my review, Involved, Orgs, Notifications. Stack view draws your whole chain as a tree, one PR per stone. Review happens in the pane, diff and inline comments and approve, no browser trips. One key merges the bottom PR and re-parents the rest. Another ships the whole stack bottom-up, retargeting each base as it goes. Every destructive action gets a confirmation screen that tells you what's about to happen: which branches move, which PRs retarget, what breaks if you say yes. No "are you sure?" with zero context.

Then there's the rest: remote stack mode for teammate stacks on repos you never cloned, drift detection with one-key reconcile, intuitive 3-pane conflict resolver so you never bond with vim again, notifications inbox with live preview, context-aware help that only shows keys that do something on the current screen, syntax-highlighted diffs, file tree, hunk navigation, threaded inline replies, full-page conversation view, board sections powered by search filters, tab cycling, header jumping, grouping by repo, and dark and light themes fully overridable.

Daily driver at work. Feedback welcome, especially from anyone who's tried stacking and given up.

u/ekwarg — 13 hours ago
▲ 7 r/git

Overlap - another perspective into your git history?

Hi!

Although the recent trend seems to be to announce a groundbreaking new git client and no less, with which we at syntevo can't really keep up as we're still developing exactly one, we think there's still some other interesting things around git.

One thing we recently added to SmartGit is what we call the Overlap column. It's a bit weird to explain, since it doesn't have an exact counterpart in git itself, and as far as we know no other git client shows this information either (please correct me if I'm wrong, it would be very interesting to see what others have come up with!).

In essence, we tried to make visible what git doesn't track or display on its own, namely the relationship between changes introduced by commits in your branch.

Sounds a bit abstract, but this new column shows you at a glance which commits have overlap with one or more selected commits.

An example: Suppose you have a bunch of commits. The last one introduces a few changes, but you're not sure whether these changes should be made somewhere else in your branch, or if they are undoing what you did earlier.

What I've been doing in this case was to go into the file logs to find the relevant commits, and inspect them, one file at a time. That works well, and is quite fast thanks to git being quick, but it's also a bit cumbersome, especially with many files. So instead of doing that, I sometimes resorted to combing through the log itself, which can be tedious as well. With Overlap, you just select that last commit, and the commits which have some Overlap with that selected commit are highlighted.

Having built that feature (and all the other stuff around history re-ordering, splitting, modifying which goes hand-in-hand with Overlap), we are living inside a bubble of course. So I wonder, what does r/git think about this? Do you think this is useful? Is it just another gimmick you won't use? Does AI make it irrelevant anyway since you don't read code anymore, anyhow?

Let us know what you think!

https://docs.syntevo.com/SmartGit/Latest/Manual/GUI/Overlap

https://www.youtube.com/watch?v=p84uBgYndS4

https://www.smartgit.dev/features/clean-commits/

u/wnesensohn — 14 hours ago
▲ 0 r/git

GitWand — a free, open-source Git client that auto-resolves ~95% of merge conflicts deterministically (with optional AI assist for the rest)

Hey r/git, I'm the developer of GitWand (https://gitwand.app/), an open-source Git client I built to auto-resolve merge conflicts. It's a native app (macOS/Linux/Windows, ~8MB, no Electron) that classifies every conflict hunk using 10 deterministic patterns first, so most conflicts are resolved without any AI involved. For the trickier ~5%, you can ask an AI assistant to help in one click. It's 100% local, free, MIT-licensed, no account required, and telemetry is anonymous and GDPR-compliant. It also ships a full Git client (commit graph, diffs, PRs, worktrees) and an MCP server for AI agents like Claude Code or Cursor. Curious what this community thinks of the deterministic-pattern approach vs. AI-based conflict resolution.

▲ 0 r/git

Show new untracked files

I want git diff to include new files that are untracked but there's no way to do it. git add -N is a hack to do it but it breaks stash which I use a lot.

I can try to get a list of new untracked files and add it to git diff output which can solve the problem but git ls-files --exclude-standard --others includes files that are deleted or removed. How can I list only files that are untracked and new like the untracked files in git status?

reddit.com
u/Beautiful-Log5632 — 1 day ago
▲ 0 r/git

GitHub quietly restricted public access to stargazer data this week. Small change, uncomfortable precedent.

GitHub's June 30 changelog announced access restrictions on the public API endpoints and UI views that expose stargazer and watcher lists. Their stated reason is spam and scraping abuse, which is probably true.

But it broke an entire ecosystem of small tools overnight. Star history charts, trending trackers, academic research on open source adoption, all of it depended on data that was public since GitHub existed. It stopped being public because one company decided so, with a changelog entry.

The thing that sits wrong with me is not this specific change. It is the reminder of the architecture. Git itself is decentralized by design, every clone is a full copy, no server is special. The collaboration layer we built on top of it is the most centralized thing in software, and every piece of "public" data there is public at one company's discretion.

There are attempts at alternatives. Radicle has been at the peer-to-peer version for years. Forgejo and Codeberg cover the self-hosted path. Newer projects like gitlawb are trying a federated angle, repos pinned to IPFS with signed refs gossiped across nodes so no single operator can restrict or remove data. Whether any reach critical mass is an open question, network effects are brutal.

Curious how git users here see it. Is the hosting layer's centralization just a pragmatic tradeoff you accept, or does something like this make you think the collaboration layer should inherit git's decentralization?

reddit.com
u/amu4biz — 1 day ago
▲ 2 r/git

Acode and Git

Hi!

I need to work on files in an .md file repository from my Android tablet.

Can I manage my Git repository using Acode? Can I work offline on the repository and then commit offline and later push to my repository on the GitHub website?

Thanks

reddit.com
u/Pawn371 — 2 days ago
▲ 0 r/git

I built eve, a free and open source layer on top of Git that tracks product evolution instead of just code

https://preview.redd.it/ztcxoc0eaebh1.png?width=1200&format=png&auto=webp&s=47506b78ccc97884f76383b5b3dc73996e83d408

Git is over 20 years old, and it’s still one of the best tools we have.

But the way we build software has changed.

Increasingly, we’re reviewing code generated by coding agents instead of writing every line ourselves. We spend a lot of time looking through diffs, even though what we actually care about is how the product is evolving.

I built eve to explore a different layer on top of Git.

Git tracks code. eve tracks product.

Instead of only seeing commits, eve groups them into meaningful product changes. For each evolution you can see:

  • Why the change was made
  • The related commits
  • Validation and tests
  • Conversations behind the change
  • A snapshot of how the product evolved

Everything is backed by Git. You can still inspect commits, diffs, and the full history whenever you want.

The goal isn’t to replace Git. It’s to make repository history understandable to more than just engineers. A CEO, designer, or product manager should be able to follow how a product has evolved without reading hundreds of commits.

It’s completely free, open source, and self-hostable.

https://github.com/nhestrompia/eve

I’d love honest feedback.

  • Does this solve a real problem?
  • Would you use something like this in your projects?
  • What would you change?
reddit.com
u/nhestrompia — 3 days ago
▲ 29 r/git+1 crossposts

Awesome Commit Conventions

💡 I've just published awesome-commit-conventions (https://github.com/khasky/awesome-commit-conventions), a concise technical reference for commit message conventions.

The guide focuses on writing consistent, readable commit messages that remain useful beyond the initial code change. A well-structured commit history can support code review, debugging, changelog generation, release notes, and versioning decisions.

The reference covers:

- Commit message structure
- Conventional Commits
- Commit types and scopes
- Breaking changes
- SemVer-oriented release workflows
- Changelog-friendly Git history
- Practical examples and common edge cases

GitHub: https://github.com/khasky/awesome-commit-conventions

#Git #ConventionalCommits #SemVer #Changelog #AwesomeLists

u/Khasky — 3 days ago
▲ 1 r/git+1 crossposts

Trasnfer account benefits/settings

Dear guys, since i created two GitHub accounts at the beginning of my University path, now i use only one of those for work and university projects... but i activated long time ago Educational benefits on the wrong account, is possible to transfer it form an account to another?? Have you some insights?

Thank you so much.

reddit.com
u/ALE00121 — 2 days ago
▲ 0 r/git

I finally built a solution for the one thing that annoyed me most about Git.

After constantly messing up my commits by using the wrong global email, I built a small utility for macOS/Windows to switch profiles in one click.

I’ve been using it for a while and it saved me a lot of headaches, so I thought I’d share it for anyone else who deals with multiple git identities.

reddit.com
u/achuth_hadnoor — 3 days ago
▲ 0 r/git

need advice on these situation

im using github as my online repo

  1. how do i share my work which i created a branch to another person to check. do i push my work so that he can do a pull or do i need to create a fork then apply my changes there then give him the link?
  2. how do i revert back my changes ? do i just use checkout and checkout previous version or a reset --hard? is it much better to create a branch do my changes then just deleting the branch if it doesnt work?
reddit.com
u/techlover1010 — 3 days ago
▲ 0 r/git

Handoff context for git

Built a small OSS tool over the weekend: branchcontext — an MCP server that logs what an agent did/decided/flagged on a branch, so a fresh session (or a different agent) can pick up where the last one left off, instead of starting blind. Stores everything as plain JSONL committed into the repo itself — no external DB, works with git log even without the tool installed. Curious if this matches a pain anyone else here has, or if you're already solving it another way. https://github.com/tshore2004/branchcontext

u/barry_benson9231 — 4 days ago
▲ 0 r/git+1 crossposts

Me cansé de cambiar de cuenta de GitHub cada vez que cambiaba de proyecto, así que hice un CLI para solucionarlo

Trabajo constantemente con repositorios personales, del trabajo y de clientes.

Uno de los problemas que más me molestaba era tener que cambiar entre cuentas de GitHub. Entre credenciales, autenticaciones y configuraciones de Git, terminaba perdiendo tiempo en algo que debería ser transparente.

Así que decidí crear una herramienta para resolverlo.

Se llama GAM (Git Account Manager)

¿Qué hace?

• Permite gestionar múltiples cuentas de GitHub.
• Autenticas cada cuenta una sola vez mediante OAuth.
• Cambias entre ellas con un solo comando.
git push, git pull y git clone funcionan sin volver a iniciar sesión.
• Puedes asignar alias como 'work', 'personal' o 'cliente'.

Ejemplo:

gam add
gam use work
git push

Repositorio:
https://github.com/miguelbalvin-dev/gam

Instalación:

npm install -g @gamcli/gam

Es la primera versión pública, así que me gustaría recibir feedback de otros desarrolladores.

¿Qué funcionalidades creen que harían falta? ¿Cómo manejan ustedes múltiples cuentas de GitHub?

u/Acceptable-Ticket353 — 5 days ago
▲ 0 r/git+1 crossposts

Issue with cloning to Github Desktop

So basically I'm trying to copy a gitlab repository that isn't mine (but I gave guest access) to my github desktop.

When I put it there and input my username with password (I've even tried many different PAT's) it gives me this error message.

If it helps anyone the repository is a Hoi4 mod.

u/Kuci21 — 5 days ago
▲ 5 r/git+6 crossposts

Claude Code made me code fast, but announcements still take ages, so I built Shipnote to save myself hours.

Shipnote - turn every commit into an announcement

Connect your repository (read-only, always), and for every release it reads your commits and pull requests, separates customer-facing changes from internal plumbing, and drafts everything for you: changelogs, release notes, plain-English summaries, Discord posts, emails, X posts, blog posts, whatever you need. Everything is editable, you choose where it gets published, and it can even generate drafts automatically on every push.

Full disclosure: I'm the solo developer, so yes, this is a shameless self-plug. But it genuinely came from my own AI coding workflow, and I'd rather get honest feedback than a pile of empty upvotes.

There's a free trial with no credit card required if you want to point it at a real repository and see what it produces. And if the output is rubbish for your project, I genuinely want to know.

https://reddit.com/link/1um10bl/video/ft10zhti6xah1/player

reddit.com
u/titleRivals — 5 days ago
▲ 17 r/git

Self-host Git or use GitHub/GitLab?

I only need a Git remote for syncing repos between a few computers and employees.

No CI, issues, project management, or extra features. Just reliability, backups, durability, low maintenance, and strong privacy.

Is self-hosting worth it for privacy, or is GitHub/GitLab still the better boring choice?

reddit.com
u/Ok_Instance1684 — 6 days ago
▲ 0 r/git

Why does everyone recommend learning Git so early?

I'm comfortable with HTML, CSS, and Python, but I keep hearing that Git is essential. Besides version control, how has Git actually helped you in real projects or when working with others?

reddit.com
u/SuperbRuin8319 — 7 days ago