It seems like my project is getting bigger and bigger with every Git commit/push. Is there a way to clean up my Git folder?
It seems like my project is getting bigger and bigger with every Git commit/push
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure what you want. First of all, of course each time you commit/push the directory is going to get a little larger, since it has to store each of those additional commits.
However, probably you want
git gcwhich will “cleanup unnecessary files and optimize the local repository” (manual page).Another possibly relevant command is
git cleanwhich will delete untracked files from your tree (manual page).