Just like the title, I accidentally ignored the file of a certain project in sourcetree. I tried to upload it to my github in the past two days and found that it seemed to have been ignored by me. However, I am not very proficient in using git. Could you please give me some advice? How to cancel ignoring using sourcetree or how to cancel ignoring using linux command line.
I found gitignore during the search, but I don’t know how to use it!
Thank you all in advance!
To add, based on the answers and comments of @manong and @Bpazy, I checked my files. I feel that I may have misled them because of my lack of understanding of git. I will post pictures for your convenience. .
I found that there is no such folder, maybe my description is wrong. Then, I tried again. I just compressed my project folder and found that git could actually track it, and sourcetree prompted if it was larger than 10m, whether to track it.
Is it because of the file size limit of git?
Look for a file called
.gitignore
in your code directory. After opening, it will contain all the files to be ignored. Paths and wildcards are supportedBecause I don’t know where the ignore file exists under SourceTree, so I can only tell you how to submit the ignore file under SourceTree.
Then find the file you want to submit in Unstaged files. After selecting File status, the number of files you want to submit will appear, but at this time you still cannot see the file and cannot submit it
In this way, you can see the ignored files and commit will also be lit.
Supplement:
I tested it, I was stupid and couldn’t find the .gitignore file, but the ignored file will not disappear and is still in the project directory, so just submit it directly (ノ_<)
Git - gitignore Documention