fail to push large files in history of git












1















I found some similar questions with the same topic, but I could not resolve the problem with the them.



I am trying to push the existing repository to the github. There was some large files in the history that I removed with rm. Then I found I should do this with git rm --cached file-to-remove.zip. Now push try to upload those file and I get the following error.
Thank you for any guide.



$ git push -u origin master
Username for 'https://github.com': a.ziaeemehr@gmail.com
Password for 'https://a.ziaeemehr@gmail.com@github.com':
Counting objects: 4340, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2619/2619), done.
Writing objects: 100% (4340/4340), 286.38 MiB | 914.00 KiB/s, done.
Total 4340 (delta 1941), reused 3133 (delta 1416)
remote: Resolving deltas: 100% (1941/1941), done.
remote: warning: File functional_network/Wilson/human/data/png/movie.gif is 67.74 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: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File DiGraph/wang-buszaki/Shivakeshavan/src/ttt is 134.33 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/1/timeseriesE.txt is 135.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/timeseriesE.txt is 135.49 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Ziaeemehr/my_neural.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Ziaeemehr/my_neural.git'









share|improve this question























  • Possible duplicate of How to remove/delete a large file from commit history in Git repository?

    – phd
    Nov 13 '18 at 11:51











  • stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

    – phd
    Nov 13 '18 at 11:51
















1















I found some similar questions with the same topic, but I could not resolve the problem with the them.



I am trying to push the existing repository to the github. There was some large files in the history that I removed with rm. Then I found I should do this with git rm --cached file-to-remove.zip. Now push try to upload those file and I get the following error.
Thank you for any guide.



$ git push -u origin master
Username for 'https://github.com': a.ziaeemehr@gmail.com
Password for 'https://a.ziaeemehr@gmail.com@github.com':
Counting objects: 4340, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2619/2619), done.
Writing objects: 100% (4340/4340), 286.38 MiB | 914.00 KiB/s, done.
Total 4340 (delta 1941), reused 3133 (delta 1416)
remote: Resolving deltas: 100% (1941/1941), done.
remote: warning: File functional_network/Wilson/human/data/png/movie.gif is 67.74 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: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File DiGraph/wang-buszaki/Shivakeshavan/src/ttt is 134.33 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/1/timeseriesE.txt is 135.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/timeseriesE.txt is 135.49 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Ziaeemehr/my_neural.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Ziaeemehr/my_neural.git'









share|improve this question























  • Possible duplicate of How to remove/delete a large file from commit history in Git repository?

    – phd
    Nov 13 '18 at 11:51











  • stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

    – phd
    Nov 13 '18 at 11:51














1












1








1








I found some similar questions with the same topic, but I could not resolve the problem with the them.



I am trying to push the existing repository to the github. There was some large files in the history that I removed with rm. Then I found I should do this with git rm --cached file-to-remove.zip. Now push try to upload those file and I get the following error.
Thank you for any guide.



$ git push -u origin master
Username for 'https://github.com': a.ziaeemehr@gmail.com
Password for 'https://a.ziaeemehr@gmail.com@github.com':
Counting objects: 4340, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2619/2619), done.
Writing objects: 100% (4340/4340), 286.38 MiB | 914.00 KiB/s, done.
Total 4340 (delta 1941), reused 3133 (delta 1416)
remote: Resolving deltas: 100% (1941/1941), done.
remote: warning: File functional_network/Wilson/human/data/png/movie.gif is 67.74 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: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File DiGraph/wang-buszaki/Shivakeshavan/src/ttt is 134.33 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/1/timeseriesE.txt is 135.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/timeseriesE.txt is 135.49 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Ziaeemehr/my_neural.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Ziaeemehr/my_neural.git'









share|improve this question














I found some similar questions with the same topic, but I could not resolve the problem with the them.



I am trying to push the existing repository to the github. There was some large files in the history that I removed with rm. Then I found I should do this with git rm --cached file-to-remove.zip. Now push try to upload those file and I get the following error.
Thank you for any guide.



$ git push -u origin master
Username for 'https://github.com': a.ziaeemehr@gmail.com
Password for 'https://a.ziaeemehr@gmail.com@github.com':
Counting objects: 4340, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2619/2619), done.
Writing objects: 100% (4340/4340), 286.38 MiB | 914.00 KiB/s, done.
Total 4340 (delta 1941), reused 3133 (delta 1416)
remote: Resolving deltas: 100% (1941/1941), done.
remote: warning: File functional_network/Wilson/human/data/png/movie.gif is 67.74 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: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File DiGraph/wang-buszaki/Shivakeshavan/src/ttt is 134.33 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/1/timeseriesE.txt is 135.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/timeseriesE.txt is 135.49 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Ziaeemehr/my_neural.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Ziaeemehr/my_neural.git'






git github






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 9:00









AbolfazlAbolfazl

18912




18912













  • Possible duplicate of How to remove/delete a large file from commit history in Git repository?

    – phd
    Nov 13 '18 at 11:51











  • stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

    – phd
    Nov 13 '18 at 11:51



















  • Possible duplicate of How to remove/delete a large file from commit history in Git repository?

    – phd
    Nov 13 '18 at 11:51











  • stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

    – phd
    Nov 13 '18 at 11:51

















Possible duplicate of How to remove/delete a large file from commit history in Git repository?

– phd
Nov 13 '18 at 11:51





Possible duplicate of How to remove/delete a large file from commit history in Git repository?

– phd
Nov 13 '18 at 11:51













stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

– phd
Nov 13 '18 at 11:51





stackoverflow.com/search?q=%5Bgit%5D+remove+huge+file

– phd
Nov 13 '18 at 11:51












2 Answers
2






active

oldest

votes


















1














As you have already read in your error message:




remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f

remote: error: See http://git.io/iEPt8g for more information.




You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)



If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch to remove a file completely from your repository's history:



git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all





share|improve this answer
























  • Thank you @Clijsters, it worked.

    – Abolfazl
    Nov 13 '18 at 11:49



















0














That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277239%2ffail-to-push-large-files-in-history-of-git%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    As you have already read in your error message:




    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

    remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f

    remote: error: See http://git.io/iEPt8g for more information.




    You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)



    If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch to remove a file completely from your repository's history:



    git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all





    share|improve this answer
























    • Thank you @Clijsters, it worked.

      – Abolfazl
      Nov 13 '18 at 11:49
















    1














    As you have already read in your error message:




    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

    remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f

    remote: error: See http://git.io/iEPt8g for more information.




    You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)



    If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch to remove a file completely from your repository's history:



    git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all





    share|improve this answer
























    • Thank you @Clijsters, it worked.

      – Abolfazl
      Nov 13 '18 at 11:49














    1












    1








    1







    As you have already read in your error message:




    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

    remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f

    remote: error: See http://git.io/iEPt8g for more information.




    You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)



    If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch to remove a file completely from your repository's history:



    git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all





    share|improve this answer













    As you have already read in your error message:




    remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

    remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f

    remote: error: See http://git.io/iEPt8g for more information.




    You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)



    If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch to remove a file completely from your repository's history:



    git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 13 '18 at 9:20









    ClijstersClijsters

    2,29211428




    2,29211428













    • Thank you @Clijsters, it worked.

      – Abolfazl
      Nov 13 '18 at 11:49



















    • Thank you @Clijsters, it worked.

      – Abolfazl
      Nov 13 '18 at 11:49

















    Thank you @Clijsters, it worked.

    – Abolfazl
    Nov 13 '18 at 11:49





    Thank you @Clijsters, it worked.

    – Abolfazl
    Nov 13 '18 at 11:49













    0














    That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.






    share|improve this answer




























      0














      That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.






      share|improve this answer


























        0












        0








        0







        That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.






        share|improve this answer













        That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 9:08









        AndreasAndreas

        1,8312918




        1,8312918






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277239%2ffail-to-push-large-files-in-history-of-git%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown