0

I am using Enterprise GitHub and it has a threshold for file size.

If I ignore the file ./.git/objects/pack/pack-xxxxxxxxxxxxxxxxxxxxx.pack when pushing the folder to GitHub, what will be the consequence?

  • Was one of your push actually rejected by the server, with a message clearly indicating that this pack file was the cause of rejection ? – LeGEC Nov 27 '19 at 22:17
  • 1
    The pack file (format of file use by git to store and exchange commits) is just the symptom of the real problem that you have committed a too big file. You have to remove it from the history if you want to be able to push to github (or use git-lfs). – Philippe Nov 27 '19 at 23:21
  • @LeGEC, yes, because the .pack file is too large and because Enterprise GitHub has file size restriction. –  Nov 29 '19 at 15:58

2 Answers2

1

The threshold applies to versioned files, before compression.

The .pack files stored under .git/ are internal storage files, and are not versioned.


Github's doc page about large files implicitly talks about versioned files, you do not have to look at .pack files hidden under .git/.

First, have a look at the large files in your code : check if you haven't committed a file which happens to be larger than your repo's size limit.

You can do this with the following command (run it in git bash if you are running Windows) :

git ls-tree -r --long HEAD | sort --key 4 --numeric-sort --reverse | less

Second : look for large files in all of your repo's history. See for example this gist in github

LeGEC
  • 46,477
  • 5
  • 57
  • 104
0

.git is the working directory for git. You should not add it in your repository (and obviously not push it).

You can learn more there : What is the .git folder?

Jona
  • 1,218
  • 1
  • 10
  • 20
  • In fact, you *can't* add it to your repository (there were at one time various bugs that let you do that on some systems, but those were bugs and should all be fixed now). – torek Nov 27 '19 at 23:46