Source Tree and Github not seeing all of my files
Solution 1
I met the same problem, and after trying @khanmizan's method(which didn't work in my case) and searching more in the internet, I got the solution: in stead of using
git add .
I used
git add . -f
The original answer is here: commit a file in bin directory
Solution 2
By default git will not stage sub-folder contents. you can run the following command from the root directory of your repo to stage all files.
git add .
Now all files should be displayed in source tree. However if you still find some file missing, please check the .gitignore file. by default .gitignore file blacklists all generated files like .exe .jar etc.
jth41
Updated on June 27, 2022Comments
-
jth41 almost 2 years
I tried creating a repository of all the files I am using in this project.
And for some reason when I added files to my local directory, only some of them were picked up by SourceTree and commited and pushed to Github.
Here is what the local directory looks like (Each folder contains files):
The folders boxed in red are not being seen at all by SourceTree.
Here is what displayed in SourceTree:
As you can see from the screenshot, Only the Vb.net project and the javascript project were picked up by SoruceTree. What do I need to do to pickup those other folders of files?
-
EWit over 9 yearsThis would be better suited as a comment or edit on khanmizan's answer.
-
Zhang Tianbao over 9 yearsI don't have enough reputation to comment on others' answer/question. And I don't feel confident enough to edit others' answer.. But thanks EWit, I will note it next time. :)