2017-02-13 14 views
1

Я пытаюсь решить две дилеммы здесь. Первое является более критическим и является окончательным вопросом здесь. Второй - в моем списке желаний.Невозможно зафиксировать или нажимать файлы под размер файла менее 50 МБ в GitHub с помощью Windows Git Bash

Я добавил три новых файла в новый репозиторий под названием test. test1.csv (88,507 KB) и test2.txt (330,854 KB). И еще один файл, который ОЧЕНЬ МАЛЫЙ по размеру. Я позвонил git add *, затем позвонил git commit -m "comment", а затем позвонил git push. Это породило ошибки, в которых говорилось, что размеры файлов слишком велики. Теперь после удаления двух больших файлов и оставления третьего небольшого файла. Я добавил, зафиксировал и нажал еще раз. И я получаю этот результат. Странно, что я могу получить максимальные размеры. 50 МБ и 100 МБ.

  1. Когда я застегиваю эти файлы отдельно, я могу получить размер файла довольно маленьким. test1.csv zipped в test1.zip становится 3,552 KB и test2.txt zipped в test2.zip становится 16,200 KB. Даже после удаления этих двух файлов и добавления двух небольших сжатых файлов я получаю вывод (ниже). Значит, он думает, что старые файлы все еще там, может быть? Как я могу нажать эти файлы, а также третий очень маленький файл?

  2. Выход говорит, что максимальный размер файла составляет 50 МБ, а также 100 МБ. Что правильно?

    [email protected] MINGW64 /c/git/test (master) 
    $ git push 
    warning: push.default is unset; its implicit value has changed in 
    Git 2.0 from 'matching' to 'simple'. To squelch this message 
    and maintain the traditional behavior, use: 
    
        git config --global push.default matching 
    
    To squelch this message and adopt the new behavior now, use: 
    
        git config --global push.default simple 
    
    When push.default is set to 'matching', git will push local branches 
    to the remote branches that already exist with the same name. 
    
    Since Git 2.0, Git defaults to the more conservative 'simple' 
    behavior, which only pushes the current branch to the corresponding 
    remote branch that 'git pull' uses to update the current branch. 
    
    See 'git help config' and search for 'push.default' for further information. 
    (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 
    'current' instead of 'simple' if you sometimes use older versions of Git) 
    
    Counting objects: 19, done. 
    Delta compression using up to 8 threads. 
    Compressing objects: 100% (15/15), done. 
    Writing objects: 100% (19/19), 37.45 MiB | 1.54 MiB/s, done. 
    Total 19 (delta 0), reused 0 (delta 0) 
    remote: warning: File RAW/private/test1.csv is 86.33 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB 
    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
    remote: error: Trace: df96709b4791777b7cb9d64d19a61dab 
    remote: error: See http://git.io/iEPt8g for more information. 
    remote: error: File RAW/private/test2.txt is 322.71 MB; this exceeds GitHub's file size limit of 100.00 MB 
    To https://github.com/xxx/test.git 
    ! [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to 'https://github.com/xxx/test.git' 
    
    [email protected] MINGW64 /c/git/test (master) 
    $ 
    

Вот версия Git, по командной строке Git Bash:

$ git --version 
git version 2.7.0.windows.1 

EDIT # 1:

[email protected] MINGW64 /c/git/test (master) 
$ git status 
On branch master 
Your branch is ahead of 'origin/master' by 4 commits. 
    (use "git push" to publish your local commits) 
nothing to commit, working directory clean 
+0

'Выход говорит максимальный размер файла составляет 50 МБ, а также 100 MB.' Это не делает. В нем указано, что максимальный размер файла __recommended__ составляет 50 МБ. – tkausl

ответ

0

Это печально, что Мне пришлось прибегнуть к этому как к исправлению для Git API, такой популярной системы контроля версий. Или на веб-сайте GitHub по-прежнему есть некоторые важные проблемы, которые необходимо устранить. Не лучшее решение в мире, но это сработало. И это было вызвано таким простым рабочим процессом!

  • сделать копию новых файлов
  • cd {path of 'test' parent folder}
  • удален корневую папку с именем 'тест'
  • git clone https://github.com/{organization name}/test.git
  • перемещение новых файлов в тест папку
  • cd {path of 'test'}
  • git add *
  • git commit -m "comment"
  • git push
0

Размер максимальный является 100 MB , рекомендация размер 50 MB.

Сообщение об ошибке:

remote: warning: File RAW/private/test1.csv is 86.33 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB 
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. 
remote: error: Trace: df96709b4791777b7cb9d64d19a61dab 
remote: error: See http://git.io/iEPt8g for more information. 
remote: error: File RAW/private/test2.txt is 322.71 MB; this exceeds GitHub's file size limit of 100.00 MB 

Кажется, жалуются на главный вопрос как File RAW/private/test2.txt is 322.71 MB.

При добавлении файлов попробуйте использовать -u вариант, который записывает имена удаленных файлов:

git add -u . 

Проверьте, что постановочные быть совершено с:

git status 
+0

Это, похоже, не сработало. Я обеспокоен тем, что это проблема Git или проблема с GitHub для такого простого рабочего процесса. – MacGyver

Смежные вопросы