如何列出下一个git push命令的文件

时间:2016-06-10 23:08:10

标签: git

我正在尝试用

将分支推送到原点
git push --set-upstream origin v0.8

这似乎需要永远,最终会因错误而停止

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'

所以显然它试图推送一个名为X.sql的1.5Gb文件......?我在任何地方都看不到这个文件? 所以我用

查看了日志
git log v0.8 --not --remotes=origin

给了

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

如何查看连接到提交的所有文件?只是检查一个有大文件? 从下面的答案我看到我可能提交了一个大文件并将其删除。在这种情况下,git rebase将是删除它的方法。但是,如果没有上游分支,rebase不起作用? 这是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

如果我遵循这个建议,我会

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.

我的问题可以通过删除所有当前提交来解决,只需重新提交并推送当前版本......这可能吗?

编辑:这是

的输出
git log --graph --decorate --oneline --all

*   408ef30 (master) h
|\  
| * 7d4ecd3 (origin/master, origin/HEAD) new every
| * c63f869 every bug
| * a60a14a querydate bug fixed
| * 957a6d3 problem in every
| * 602891c problem in every
| * 9e827d2 problem in every
| | * 0463323 (HEAD -> v0.8, test) branch pushed to remote
| |/  
|/|   
* |   4b6d7c8 Merge branch 'master' of https://github.com/X/X
|\ \  
| |/  
| * 539e3dc pagedown removed, bibtex bug resolved
* | 631d55a once
* | 4aa7275 once
|/  

0 个答案:

没有答案