Linked Questions
31 questions linked to/from How to find a deleted file in the project commit history?
5 votes
1 answer
2k views
Search for a file in GIT history? [duplicate]
So there was a file in one of my projects which was deleted, no one knows when or why, it's just gonne. (a few months probably). Problem is i only know a part of the name, not the full name. How can i ...
0 votes
2 answers
985 views
git rebase doesn't contain every files [duplicate]
by mistake I used "git rm my_file" in my branch. After some commits, merges and... now I'm trying to get the file back from master branch, I'm using "git rebase master" and it says ...
1 vote
1 answer
310 views
Track a (once been deleted) file [duplicate]
Here's my case: A file been added, removed and added again (same name). How do I track time stamp prior to it's most recently adding? file: file.c ---> null ---> file.c status: added ...
0 votes
1 answer
208 views
Getting the file that was deleted long time ago in git [duplicate]
I have a project with a lot of subdirs, and somewhere in there in some deep subdir there was a file called foo.py. Couple years ago it was deleted, the delete was committed and pushed. How can I see ...
1 vote
0 answers
67 views
How to find commit when file was deleted? [duplicate]
I just realized a file that I had a long time ago was deleted, and I want to find the specific commit in which it was deleted. I'm using Bitbucket and VsCode.
0 votes
0 answers
32 views
How to find the commit that contained a specific file in Git history? [duplicate]
I found a reference on a public repository for a file that is now no longer in master. What is the fastest way to find the commit that first (or last) contained that file?
3248 votes
30 answers
1.2m views
How do I find and restore a deleted file in a Git repository?
Say I'm in a Git repository. I delete a file and commit that change. I continue working and make some more commits. Then, I discover that I need to restore that file after deleting it. I know I can ...
1719 votes
11 answers
516k views
Find when a file was deleted in Git
I have a Git repository with n commits. I have a file that I need, and that used to be in the repository, and that I suddenly look for and think "Oh! Where'd that file go?" Is there a (series of) ...
419 votes
9 answers
174k views
How can I list all the deleted files in a Git repository?
I know Git stores information of when files get deleted and I am able to check individual commits to see which files have been removed, but is there a command that would generate a list of every ...
103 votes
2 answers
30k views
Viewing Git history of moved files
Despite reading lots of other posts regarding GIT and moved files I still struggle to understand how to trace the full history. Doing gitk myfile as suggested here seems to only show history until ...
17 votes
2 answers
21k views
`git filter-repo` commands output nothing on Windows
I installed git-filter-repo via scoop, tried multiple git filter-repo commands e.g. git filter-repo -h, they all logged nothing, no warning or error, just nothing. Tried rebooting, reinstalling, and ...
15 votes
2 answers
14k views
How to list the change history of the directory tree in git
Git does not track directories as such. It only tracks files that live in some directory. (See How can I add an empty directory to a Git repository?) However, if I have certain history of commits I ...
8 votes
3 answers
3k views
Can I merge files in git?
I have three files Shell-ijk-ArrayList.java, Shell-ijk-Vektor.java and Shell-ikj-ArrayList.java in this git-repository. I have "merged" them manually to MatrixMultiplication.java. Now I would like to ...
5 votes
2 answers
826 views
Difference between different git search commands
A question from a beginner: there are several ways to search in git history. To me, it is not clear what, the difference between the commands really is: git log, e.g. git log -S 'for what you search' ...
2 votes
3 answers
1k views
Way to List All Changes on a File in Git
I'm trying to track down who removed some code on a particular file. I don't know when it was but certainly within the past month. Is there a way to list history of code changes and details on a ...