I am trying to push a branch to origin with
git push --set-upstream origin v0.8
This seems to take forever and eventually stops with an error
Counting objects: 180, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (180/180), 538.00 MiB | 72.00 KiB/s, done.
Total 180 (delta 142), reused 110 (delta 87)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: eef60ca4521006cb11e4b7f181bc7a1a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File X.sql is 1537.98 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/X/X.git
! [remote rejected] v0.8 -> v0.8 (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/X/X.git'
so apparently it tries to push a file with 1.5Gb named X.sql...? I can't see this file anywhere? So I had a look at the log with
git log v0.8 --not --remotes=origin
which gave
commit 046332334e1f944f64a110f92434cdc26e9fafd0
Author: X
Date: Thu Jun 9 23:47:27 2016 +0100
search branch pushed to remote
commit 4b6d7c87a34bcd43f098d54263a032bb66baf9db
Merge: 631d55a 539e3dc
Author: X
Date: Sun Jun 5 22:10:28 2016 +0100
Merge branch 'master' of https://github.com/X
commit 631d55a0998e99ebc7614bf4f58b85baa4e85403
Author: X
Date: Sun Jun 5 22:10:15 2016 +0100
once
commit 4aa7275f4381c222fff7ba9ae22ab00df886ba3b
Author: fbeutler X
Date: Sun Jun 5 22:09:27 2016 +0100
once
how can I see all files connected to the commit? Just to check with one has the large file? From the answers below I saw that I probably committed a large file and deleted it. In this case git rebase would be the way to remove it. However, rebase does not work if there is no upstream branch? Here is the output for rebase
git rebase -i
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details
git rebase <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> v0.8
If I follow this advise I get
git branch --set-upstream-to=origin/v0.8 v0.8
error: the requested upstream branch 'origin/v0.8' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
my problem could be solved by deleting all current commits and just re-committing and pushing my current version... is that possible?
Aucun commentaire:
Enregistrer un commentaire