this post was submitted on 22 Jul 2026
421 points (98.8% liked)
Technology
86590 readers
2964 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Actual question. Can you revert git to a prior state without the remote repo?
Yes, that's a core purpose of git.
git reset --hard
Yeah, as the other commenter mentioned, git is a distributed source control system, so all clones have the full history (though you can bump up the "starting point" to reduce the overhead of storing all previous commits).
Hosts like github can add more features on top of that, which would have to be backed up separately, but you can automate the repository itself using a single command, which is the same command used to make a clone in the first place.
Unless you did a shallow clone or something every repo clone is complete in git.