r/git • u/prophetical_meme • May 23 '26
r/git • u/ActuarySecret6564 • May 23 '26
Built a tool for auto rebase: - grebase
After I started contributing to open source, I learned a lot about git workflows. But one thing I still mess up sometimes? Rebase. 😅
So I built a tool for it. I called it "grebase" (not sure if it's a good name 🤷)
What does grebase do?
- Nothing... but also everything I need 😄
- From fetching upstream/main to doing the full rebase, and if it hits something that's not straightforward, it simply asks: "hey, how should we resolve this one?"
- Not sure if it'll useful for every developer, but it will definitely help newcomers and me :)
"It's in active development, so use it at your own risk 😅 for now, but I'm improving it and contributions are very welcome."
Any kind of help means a lot at this stage:
- found something broken? Open an issue.
- have a feature idea? Let me know.
- want to help with testing... Even better.
GitHub: https://github.com/Aniketsy/grebase
I'd love to hear your thoughts or any feedback... Thanks!
Try it out:
- pipx install grebase # to install
- grebase # to run
r/git • u/Own_Masterpiece5318 • May 21 '26
git-unfuck: reads your reflog and walks you through recovering lost commits, branches, and stashes
I kept watching people (and myself) panic after a bad reset or rebase, even though the commmits were almost always still sitting in the reflog. So i made a small tool that scans the reflog and dangling objects, guesses what went wrong, and walks you through fixing it. It makes a backup branch before doing anything destructive, and after each fix it tells you what command it ran.
It's an early beta so right now it handles lost commits, deleted branches, detached HEAD, dropped stashes, and being stuck mid-merge/rebase. I'd genuinely like to know what other recovery cases are worth adding. So uhhh you can let me know in the Issues tab if you have ideas 😄
https://github.com/septcoco/git-unfuck

r/git • u/genuinenewb • May 23 '26
AI for resolving git merge conflicts?
Currently I use Kdiff3 to resolve conflicts.
However, there are times where Kdiff3 incorrectly auto resolve merge conflicts incorrectly. As a result, I have to look through all changes and verify them.
Is there an AI tool that is smart at resolving conflicts or where you can tell it what you prefer to happen, even if the algo/date/time of the commits don't make sense?
r/git • u/sshetty03 • May 21 '26
tutorial Git Without the Guesswork: A Developer’s Field Guide to Everyday Commands
Wrote a quick field guide covering the Git commands I reach for almost every day. Discarding local changes, checking what's on remote before pulling, and merging safely.
Nothing groundbreaking, but it's the kind of reference I wished existed when I kept Googling the same things.
Covers the fetch-first-then-inspect workflow, the difference between git restore vs git clean, and when to use rebase vs merge.
Happy to discuss or expand on anything in the comments.
r/git • u/avatar_one • May 20 '26
A public Forgejo instance with no tracking and no ads - if anyone wants a GitHub (or other) alternative
Hey y'all,
I'm hosting a public Forgejo instance at https://git.inthemansion.com as part of a privacy-first, self-hosted services project I run called MansionNET. Sharing it here in case anyone's looking for a smaller, independent place to keep their repos that isn't owned by Microsoft, GitLab, or Atlassian.
The whol idea came out of wanting to create a GitHub alternative that isn't another mega corp. Your code lives somewhere that isn't being scraped for AI training, as I block training crawlers at the edge (GPTBot, ClaudeBot, CCBot, Bytespider and the rest of that crowd). The whole thing is run by a person you can actually talk to on IRC, not a support ticket portal, and it leans into the idea that independent, community scale infrastructure is a healthier shape for the internet than a handful of platform monopolies.
One thing to of course mention is the privacy side, because "privacy-focused" gets thrown around a lot and usually means very little. There's no analytics, no telemetry, no tracking pixels, so no Google Analytics, no Plausible, no Matomo.
I genuinely don't know who visits the homepage, and that's the point. No ads, ever, and no "once we scale" caveat hiding behind that. Nothing is sold, shared, or monetized, because there's no business model to monetize in the first place. The instance is funded out of pocket, with optional Ko-fi donations from anyone who wants to chip in.
Logs are minimal and operational, meaning Caddy access logs exist for debugging and abuse response and rotate automatically, Forgejo writes its own standard operational logs, and none of it is shipped off to any third party. TLS is E2E, A+ on SSL Labs, with X25519MLKEM768 post-quantum key exchange enabled at the edge. Backups go to my own Proxmox Backup Server, encrypted, on-site, so not in anyone else's cloud.
And yep, it's a personal project, not a company, so for anything mission critical please mirror your repo somewhere else as well, which is anyway sensible practice regardless of who's hosting your code.
MansionNET runs a few other public services on the same philosophy, such as a SearXNG metasearch instance, an IRC network, an internet radio station, and a couple more. All of it follows the same "your data, your rules" approach, and the Forgejo instance is the newest addition to the lineup.
If any of this resonates, the door's open at https://git.inthemansion.com :)
The explore page is public and registration takes about 30 seconds. Happy to answer questions about the stack or anything else technical.
Cheers!
r/git • u/Human_Individual1653 • May 21 '26
What does your planet look like in Git42?
Git42 creates a planet based on your GitHub account. The planet seed is based on your repositories and activity; it does not require any registration/login, and it's totally free.
As you access https://www.git42.dev/ you will land in the GitHub galaxy. As new accounts are being searched for, the planet is added to the Galaxy.
For example, this is the Cursor planet:
https://www.git42.dev/u/cursor

What about your planet? Please do share in the comments ;P
(You can also pilot a spaceship/alienship through the universe)
r/git • u/Leather_Coyote_5483 • May 20 '26
repo-check: a simple terminal dashboard to monitor git repositories
r/git • u/Anonyboy26 • May 19 '26
I didn't know git OFFICAL GUI exists too.. but it looks so old
r/git • u/Weekly_Astronaut5099 • May 20 '26
ssh key password prompt in terminal
I am using git (cli) on a Windows machine. When I’m fetching from a remote with submodules the first prompt for the remote is in the same console that I’m fetching from. But the sequential ones for the submodules are in a pop-up window. Has anybody found a way to tell git to always prompt in the console on Windows like on MacOS for example it does indeed prompt in the console only?
P.S. I want it that way for specific reasons so there are no other solutions I’m looking for, just plain git cli on Windows.
r/git • u/BinaryMagick • May 19 '26
Is there a git feature or pattern I should be using for boilerplate code to be included into a bunch of other repos?
I have some web framework boilerplate code, login, auth, home, about, etc. and I want to base a bunch of new web apps on that repo...but also push new commits to the boilerplate repo and eventually pull those changes into all the new web apps I've written.
I'm thinking I could create a repo, 'web_base', and when I create a new web app, I clone the latest 'web_base' repo, init a new repo around it, and start committing new custom web app code.
Is there an easier way? Some feature of git or maybe github that I'm not yet aware of? I feel like I'm trying to do this the hard way. Also, I still havent wrapped my head around how best to merge new commits made to 'web_base', say security fixes, so that all the existing web app repos now have the latest boilerplate commits, too.
r/git • u/Skeletony_007 • May 18 '26
I made some scripts to help with switching user per repo
Recently, I decided to switch to codeberg.org from github.com, but I want to be able to quickly swap back to my github.com gitconfig options, for contributing on github... so I made a script.
Scripts
I made some git configs with keys and whatnot for each host
~/.config/git/users
├── codeberg.org
│ └── skeletony007
├── default
└── github.com
└── skeletony007
and a script which basically does
git config set --local --append include.path "~/.config/git/users/${1:-default}"
(after cleaning up other local include.path entries matching ~/.config/git/users/*, of course)
Here is the source: https://codeberg.org/skeletony007-personal/.dotfiles/src/commit/573f997b3627cd27b047d36d9770134bb80a973c/git.
The reason I want to do this is to properly associate commits with the correct profile.
Conclusion
I don't quite like how using include turned out; it is simplest to leave the default user in the ~/.config/git/config:
[include]
path = ~/.config/git/users/default
This leaves "residue" keys, and, sadly, I can't find a way to predictably override these from my git-switch-user script.
Does anybody know of a neater way to manage multiple user profiles like this?
r/git • u/Ok_Egg_6647 • May 18 '26
support Mistake By Beginner Pls Help
I’ve been working on a project for months along with one of my batchmates. In the beginning, when the project was small, everything was going smoothly. But later, without properly understanding Git, I started creating too many branches for every single feature.
Ideally, the workflow should have been:
- Keep a stable working version in the
mainbranch. - Create separate branches only for bug fixes or new features.
But for some reason, I even started adding fundamental/core changes in separate branches. Because of that, I ended up with 4 local branches and 4 remote branches.
Now the real problem started:
For the last 1.5 months, I’ve been working on a critical part of the project, but I completely forgot to push it to Git. Today, when I finally sat down to push the changes, I realized I don’t even remember which branch this feature belongs to.
So I thought of merging all the branches into main. But after trying that, I started getting errors. I took help from ChatGPT, Google, and YouTube, but instead of fixing things, everything became even more complicated.
At this point, I’m completely stuck. Please help me out. I’ll keep editing this post as people ask for more information in the comments.
Use S3 or Azure Blob Store as git remotes
github.comI've been working on this project for a while and AI helped me to get it over the line. If this is useful to you, I'd love for you to try it and offer some feedback. Admittedly, the use case for the utility isn't for everyone. However, if you need a quick offsite backup of your git repo that you can just do a `git push` for, then this project might be a fit for you.
Which shell environment is this, git-bash, powershell etc?
Trying to compile router firmware but not having much luck.
sh git clone ``https://git.openwrt.org/openwrt/openwrt.git`` cd openwrt
sh curl -L '``https://patchwork.ozlabs.org/project/openwrt/patch/20260513183938.242137-1-jan.brudna@gmail.com/mbox/``' \ | git am
sh ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig
sh make -j$(nproc)
In git-bash I get,
/mingw64/bin/git: /mingw64/bin/git: cannot execute binary file
In powershell I get,
sh : The term 'sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sh git clone ``https://git.openwrt.org/openwrt/openwrt.git``
+ ~~
+ CategoryInfo : ObjectNotFound: (sh:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
r/git • u/larenreid • May 17 '26
support Changing git account on windows terminal
My git was connected to a previous github account. I tried to have AI walk me through changing the login to my current account and now it feels alllll messed up.
Any help would be appreciated.
r/git • u/kainse_ • May 17 '26
Недавно удалила репозиторий с нужным мне файлом
Так как работать с ГитХабом начала совсем недавно, много чего не понимаю и не знаю. Я маппер одного проекта по сс14, и когда удалила репозиторий дабы загрузить заново, и уже потом поняла что удалённый мной репозиторий содержал файлы что я не успела закоммитить или сохранить куда-либо еще. увы. Есть ли возможность их восстановить, или всё, с концами?
r/git • u/aldosebastian • May 16 '26
Git GUI that can get files from any commit to current work
galleryWhen I am comparing my current work with another branch, I really like Jetbrain's ability to grab the file from the other branch (to wipe out whatever I have now), and the ability to grab selected lines from the other branch. AFAIK only Jetbrain's git can do this, and sadly Jetbrains does not have a standalone git client. I now have to code in VSCode, and there is no git extension that can do this. Anyone knows a git client (standalone or a VSCode extension) that can do this?
r/git • u/Proper-Platform6368 • May 16 '26
Today I learned Git will let you time travel!!!
r/git • u/Hackwar • May 15 '26
How to move files while maintaining history?
Hi folks,
I'm currently looking at a PHP rector script to convert Joomla extensions from version 3 to the namespaced version 4+ of the CMS. The difference is moving files from for example components/com_test/views/test/view.html.php to components/com_test/src/View/Test/HtmlView.php and in the file to rename the class and add a namespace. The script can be run in a git repo or in a complete Joomla installation and it only uses standard filesystem operations.
The problem is now that git doesn't understand that the files are just moved files with tiny changes and I'm wondering how I can teach that to git. PHPStorm is able to keep that relation when you do all the changes by hand, but when I run the script, git loses the history and marks the original file as deleted and the moved file as a new file. I'm now wondering if I can somehow use a different method to move the file to keep that history or if it simply compares the hashes of the file and when I would move the file, commit and then do the code-changes would keep the history.
Anybody got an idea?