-1

I have massive folders in my git repository, and in order to publish it, I need to reduce the size of the repository, so I'm using a .gitignore file.

In my .gitignore file I ignore two folders. One folder contains the boost c++ library, and the other contains the C++ Qt library.

Both are massive. However, when I specify in my .gitignore file to exclude these folders and their contents, it actually adds to the amount of objects to be pushed.

Here is my .gitignore

boost_1_60_0/
Qt/
ERRORLOG.rtf
CHANGELOG.rtf

Any ideas on what may be causing this?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
wfehrn
  • 105
  • 1
  • 11
  • You can add a .gitignore file per directory in your file system but you can also do a {directory name}/**/* to exclude everything within that folder. –  Mar 27 '16 at 04:17
  • the {directory name}/**/* does not seem to be working. – wfehrn Mar 27 '16 at 04:19
  • Am I supposed to enclose the directory name in brackets, or is that your way of delimiting the folder name – wfehrn Mar 27 '16 at 04:19

1 Answers1

1

You have to add xxx/** or it will be tracked as files and not folders.

Folders pattern is /**.

If you already added the file to your staging area you have to remove it using the git rm --cached <pattern>.

Here is a very similar questions with the same issue more or less:

.gitignored files still shown in RStudio

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167