My folder is not tracked by git #22205
-
I have a folder So i deleted the Then on my other PC, there was git repo containing all the code of FBA_Matting with some changes, So to avoid So i copied the folder and pasted into my repository (checkout new branch, added FBA_Matting). Now I can’t see my folder back in PS: I checked |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @tbhaxor Are you still having trouble tracking that folder in Git? Was it added locally in your file directory? Or was it uploaded to the GitHub UI? |
Beta Was this translation helpful? Give feedback.
-
Not actually, I just want to know this In git repo folder i cloned another git repo (FBA_Matting). All the folders we committed but not FBA_Matting. Then later on when i removed .git folder from FBA_Matting, the contents in folder was lost. There are empty folder committed. The problem is Git never commit empty folder. How can i retrieve my files of FBA_Matting. |
Beta Was this translation helpful? Give feedback.
-
You can check your logs to go back to a previous point in time.
You can either work with the last commit that still had the file, or the commit that deleted the file. In the first case, just checkout the file from that commit:
In the second case, checkout the file from one commit before that:
If the file was never actually committed this of course will not be in the history. You mentioned:
With the folder added this changes the history, so you will need to address the differences between the files and fix the merge conflicts. Use : |
Beta Was this translation helpful? Give feedback.
You can check your logs to go back to a previous point in time.
The following steps assume you deleted the contents and then made commits after.
To find the right commit, first check the history for the deleted file:
You can either work with the last commit that still had the file, or the commit that deleted the file. In the first case, just checkout the file from that commit:
In the second case, checkout the file from one commit before that:
If the file was never actually committed this of course will not be in the history.
You mentioned: