I am new to git functions and I wrote a set of code, I intend to push it to Github but my commit report is showing over 5000 files, I do not know where such heavy set of commits emanated from. Please help!
2 Answers
You have a lot of files in folders you do not want to be pushing. The .cache folder for example. You can fix this by creating a .gitignore file containing the paths that you don't want to push.
For example, to add the .cache folder to .gitignore, you can use.
.cache Figure out which files you want to push to github, and which you should not be pushing. Also, if you have already pushed any files to the repo that are included in the .gitignore, you will need to remove them.
6 Comments
The Otterlord
I thought they had not pushed yet? These files look previously untracked?
Sam Bayo
I have a .gitignore file already, how do I put those files there? Because I have done a system search, I cannot even find the location of those unwanted files on my machine
The Otterlord
Thanks, I've added something to the bottom to explain this :)
Sam Bayo
@TheOtterlord the files are not pushed yet, they are all in my local machine
The Otterlord
@SamBayo The gitignore just defined the paths of the files. Open the gitignore and add the path of the directories you don't want to include.
|


git initin your home directory...