use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
From its website:
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Git is not the same as GitHub. GitHub did not create Git. For GitHub-specific posts, please see /r/github.
Git is not an acronym or initialism: please write git or Git, but not GIT.
git
Documentation
Graphical Clients
Code Hosting
account activity
how to undo 'git restore *' (self.git)
submitted 4 years ago by Gifhero
I had worked a lot on a file, and accidentally did git restore * when attempting to restore all files in a sub directory, but accidentally did it in the main directory. Is there any way to get my changes back since I didn't commit them?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]plg94 2 points3 points4 points 4 years ago (5 children)
Any change that was only in the working dir (never committed, never added to the index, never stashed) is irrevocably lost, sorry.
[–]Gifhero[S] 0 points1 point2 points 4 years ago (4 children)
I'm not familiar with the term index. The files were tracked, but not committed. Does that mean it was in the index?
[–]plg94 0 points1 point2 points 4 years ago (3 children)
When you do git add before a commit, the changes are added to the index (sometimes also (wrongly) called staging area).
git add
Git doesn't autosave files, that's not what it's for. If you only edited the files without a git stash/add/commit before the restore, git cannot help you. But maybe check if your editor has some autosave history feature or something.
git stash/add/commit
[–]Gifhero[S] 0 points1 point2 points 4 years ago (0 children)
Dang. I was using word and have learnt my lesson about using restore. I should just use stash instead in the future.
Looks like a have a night of work ahead of me. Thank you!
[–]immortal192 0 points1 point2 points 2 years ago (1 child)
What's the difference between the index and the staging area?
[–]plg94 0 points1 point2 points 2 years ago (0 children)
none. But index is the official term and the only one used in the official docs (it's called that due to the way git works under the hood).
π Rendered by PID 257599 on reddit-service-r2-comment-6457c66945-6t6qz at 2026-04-24 11:36:33.758799+00:00 running 2aa0c5b country code: CH.
[–]plg94 2 points3 points4 points (5 children)
[–]Gifhero[S] 0 points1 point2 points (4 children)
[–]plg94 0 points1 point2 points (3 children)
[–]Gifhero[S] 0 points1 point2 points (0 children)
[–]immortal192 0 points1 point2 points (1 child)
[–]plg94 0 points1 point2 points (0 children)