
r/git

How can I use git completely locally and offline?
Absolute beginner here, I want to start using git or any other version control for my game but every guide/tutorial I try to learn from is just Github Github Github. I don´t want backup on other servers I just want to be able to get back if I screw up.
Beginner Git & GitHub tutorial recommendations?
Hey everyone I already know some basics of Git and GitHub but I’m still not confident with it. Today I watched a 2hour YouTube video but it was quite advanced, used Mac commands and is also pretty old (about 5 years ago). So I want something more beginner friendly and up to date. Any recommendations for good channels or videos with the current version?😭
Git vs saving.
How often do you use git vs saving files. I tend to save after every chance but only commit when I am done with the files for that session.
Part of me wishes I could get git to commit with each commit but know that would be messy
git-autosave: Autosave your working tree to the remote
I came up with an autosave plugin for git. I've been developing a hobby of writing lately, and in my effort to allow myself to write and edit stories locally, I realized I would be missing out on the autosave functionality that Reedsy's editor provides. I tried using Syncthing for a while (and I still do), but I realized while working on another project that Git can probably do something similar with a plugin. Thus, git-autosave.
It works by having the daemon watch for edits to the repository, then creating a commit automatically. The commit is not put on any branch, but instead saved to refs/autosave/autosaves/<device id>/<branch name>. Running git restore-autosave fetches all of the references in that namespace from the remote, and merges an autosave from another device into your working directory. If there's more than one autosave available, then you are given the choice to select one. This is done without creating a new commit, so autosaves will not infect your commit history.
It's also fairly robust if you decide to work without an internet connection. Unpushed autosaves are stored in a queue, to be pushed when the computer regains internet. All repositories are pushed automatically when the device restarts.
I don't know how much maintenance I'll do to this system in the future, but I thought somebody might find it interesting, so I figured it was worth sharing.
Anyone here using git worktrees as their default workflow?
I’ve been experimenting with using worktrees more aggressively to avoid context switching, but the raw UX feels a bit manual for day-to-day use.
Ended up building a wrapper to standardize how I create/manage them.
Curious how others are using worktrees in practice:
- do you keep one per branch?
- how do you handle environment setup?
- do you automate cleanup?
Repo (if curious): https://github.com/ewilazarus/git-workspace
Are you offended if your commits are squashed?
The offensive potential of squashing was suggested to me, and I was blown away. I really thought it was just about how people liked to look at their graphs, and I had no inkling there was an element like this. Please help me recalibrate.
Situation: you submit a pull request, which is accepted, but acceptance requires that your commits be squashed into a single commit when the PR is merged.
How does this make you feel? Does it bother you? Would you care? Is it oppressive or otherwise unpleasant? Do you feel contempt or disdain for the maintainer? Would it deter you from a contribution, or make you hate your boss? Describe the emotions involved and overall experience.
Some details:
You are allowed to determine the commit message for the squashed commit, and you don't have to do the squashing or rebasing, it's automatic. Your feature branch history can be anything at all, and it will remain in the PR on the server, just not in the history of the main branch.
Using Git activity to generate a weekly newsletter automatically
Most engineering teams already have all their activity in Git:
- commits
- pull requests
- merges
But when it comes to sharing updates (with the team, stakeholders, or even users), it usually turns into a manual newsletter or status report.
So instead of writing those updates manually, this approach turns Git activity into a daily + weekly newsletter automatically → https://gitmore.io
The idea is pretty straightforward:
- analyze repo activity over the week
- structure it into something readable
- send it as a clean summary
Instead of raw logs, the newsletter highlights things like:
- what shipped
- what’s still in progress
- notable changes
What’s interesting is that it’s not just for devs, it’s actually readable by non-technical people too. So it can double as:
- internal team updates
- stakeholder reports
- lightweight product updates
No one has to ask “what happened this week?” or write it manually anymore.
Curious how others handle this:
- Do you send weekly updates/newsletters?
- Is it manual or automated?
- Who usually writes it?
Feels like this is one of those small things that quietly eats time every week.
Have some old devs wanting to learn git, tried to make them a simple game to help, it turn out more complex
Hi, i just wanna share this so it want die with me.
In my team two old dudes that use tfs, now they tried using git, helped them with it, demos, explaining and documentation, after 2 months they still got a probem to understand concepts like branches, so i told my self to create a simple game now that i have access to claude, that will be quick and give more context, the idea was something they did know like AOE, simple resources, simple battles, but every task/tasks need a branch, but when i did implimented it turned out more complex to play and understand.
You can check it here: https://slient-commit.github.io/git-war/
Learn Git as a Game
I kept messing up Git even after watching tutorials… so I built a way to practice it like a game
Most Git tutorials explain commands, but when I actually had to use them (branching, merging, fixing mistakes), I’d get stuck.
So I built a small interactive tool where you can learn Git by doing, not just reading.
It simulates a real Git environment where you solve challenges like:
- creating and switching branches
- resolving merge conflicts
- understanding commits visually
It’s basically a hands-on playground instead of another tutorial.
You’ll probably like it if:
- you’re a beginner struggling with Git
- you’ve watched tutorials but still feel confused
- you prefer learning by experimenting
Would really appreciate honest feedback — what’s confusing, what’s missing, what should be improved.
Link: https://gitgame-4f0eb.web.app/
(Desktop works best right now)
How do I preserve original commit authors when merging PRs on GitHub?
Hey everyone,
I’m maintaining a repository on Github https://github.com/open-ug/conveyor and ran into something that’s been bothering me.
Whenever contributors open a pull request and I merge it, the commits end up showing as if I’m the one who made them, even though they clearly belong to the contributor. I want to make sure people get proper credit for their work, but right now the history/UI feels misleading.
I suspect it might be related to how I’m merging (maybe squash or rebase?), but I’m not entirely sure what’s causing it or what the best practice is here.
So I have a few questions:
- What merge strategy should I be using to preserve original authorship?
- Is there a way to fix this behavior in repo settings?
- If squash merging is preferred, how do you handle proper attribution?
Would really appreciate any guidance or best practices from people who’ve dealt with this before.
Thanks!
How do working trees get this tangled?
This is a real tree from one of my projects. Out of interest, how does this happen?
Portable Git client
Hi. Is there fully portable Git client with GUI that can I have on USB stick? Including SSH and GPG keys. And best, if it is for Windows and Linux.
Thanks.
Git Graph hasn't been updated in years, so I built a modern alternative
Hey everyone.
I’ve been using the classic Git Graph extension for a long time. It works, but it hasn't received an update in over 3 years and the UI feels pretty dated at this point.
I got tired of waiting for updates, so I built my own replacement: Git Graph Plus.
I rewrote it from the ground up using Svelte. The main goal was just to make it cleaner, and actually maintain it. You can do all the usual stuff you’d expect branching, merging, rebasing, cherry-picking right from the visual graph.
It’s completely open source. If you're still using the old extension and want something a bit more modern, give it a try and let me know how it feels.
Repo is here: https://github.com/the0807/git-graph-plus
VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=the0807.git-graph-plus
If you run into bugs or have feature requests, drop an issue on GitHub or just let me know here. Thanks.
New git staging tool - git-stage-batch
git-stage-batch adds named deferred change sets (“batches”), multi-pass staging, and finer-grained patch selection on top of the usual hunk workflow. I built it because git add -p and rebase alone weren’t enough for large refactors. The stateful CLI is especially useful for autonomous and scripted workflows to stage commits from a dirty working tree, but there's a tui, too.
I'm interested in feedback from people who obsess over commit hygiene.
I made a short video that finally made Git click for me (11 min)
I struggled to understand Git for a long time — especially the mental model of how commits, branches, and HEAD actually work together.
So I made a short video explaining it visually in 11 minutes: https://youtu.be/s3UVVkmyS78?si=FIe2HrfsKPHV5R0G
Covers:
- How Git actually tracks changes
- Branches and commits visually explained
- Common mistakes beginners make
Hope it helps someone here who's been confused like I was. Happy to answer questions in comments!
[ANN] dojjo (djo): worktrunk-style workspace manager for jujutsu (jj)
I wanted a worktrunk-style workflow for jj, so I built one: dojjo (djo).
It is a small CLI that manages workspace lifecycle in jj repos:
- switch (create/switch workspace + bookmark)
- list (with conflict/divergence indicators)
- merge (squash/rebase/move bookmark/cleanup)
- remove, prune, for-each
- lifecycle hooks (pre-* and post-*)
- shell integration with completion (zsh/bash/fish/pwsh)
It also reads worktrunk config (.config/wt.toml), so existing setup is easy to reuse.
Read more here.
I would love feedback, especially on:
- merge defaults
- hook behavior.
- Shell integration (I personally only use zsh)
Does cherry-pick *always* expects a clean working tree?
I know I can stash and do this, but I'm just wondering what cherry-pick actually expects.
I currently have two unstaged files. The commit that I want to cherry-pick will touch neither of these files, so I don't know why it complains "your local changes would be overwritten by cherry-pick".
If I do cherry-pick --no-commit then the change is cleanly applied, so I'm thinking why it can't just commit that instead of me having it write the commit in an additional step.
I think if there was nothing staged before the cherry-pick, and the files being overwritten by the cherry-pick are the same as in the cherry-picked commit's parent, then it should've worked. The state of the other unrelated files shouldn't matter.
Is this just git being extra cautious and not wanting to deal with any potential edgecases? I'm trying to understand what's the worst thing that can happen if I were to implement this in a script/alias.