相关疑难解决方法(0)

Git:如何从历史提交中删除文件?

我提交了id 56f06019(例如).在那个提交中,我不小心提交了大文件(50Mb).在另一个提交中,我添加相同的文件,但大小合适(小).现在我克隆的回购太重了:(如何从回购历史中删除那个大文件以减少我的回购的大小?

git

107
推荐指数
3
解决办法
4万
查看次数

Git非快进被拒绝

我觉得这个问题已被多次询问,但解决方案通常是"我删除了目录并重新完成了我的工作." 我做了提交和推送,但意识到我在提交消息中提到了错误的票号.所以我在SO上寻找快速解决方案并最终在终端中键入以下内容:

$ git reset --soft HEAD^
$ git commit -m "... correct message ..."
Run Code Online (Sandbox Code Playgroud)

唯一的问题是我收到以下错误消息:

To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again.  See the 'Note about
fast-forwards' section of 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)

我正在使用git-flow模型,正在开发分支.我怎样才能将东西合并回来让git再次开心?

git version-control

87
推荐指数
4
解决办法
9万
查看次数

Github文件大小限制已更改为6/18/13.现在不能推

截至2013年6月18日,此更改如何影响我的现有存储库,其文件超出此限制?我上次用大文件推了2个月前.

我有一个大文件,我已在本地删除但我现在无法推送任何东西.我得到一个"远程错误"...远程:错误:文件cron_log.log是126.91 MB; 这超过了GitHub的文件大小限制为100 MB

我在原始推送后将文件添加到.gitignore ...但它仍然存在于远程(原点)

在本地删除它应该在原点(Github)摆脱它吗?......但是......它不会让我推,因为Github上的文件超出了限制...

https://github.com/blog/1533-new-file-size-limits

这些是我发出的命令加上错误信息..

git add .
git commit -m "delete cron_log.log"
git push origin master

remote: Error code: 40bef1f6653fd2410fb2ab40242bc879
remote: warning: Error GH413: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: error: File cron_log.log is 141.41 MB; this exceeds GitHub's file size limit of 100 MB
remote: error: File cron_log.log is 126.91 MB; this exceeds GitHub's file size limit of 100 MB

To https://github.com/slinds(omited_here)/linexxxx(omited_here).git
 ! [remote rejected] master -> master …

git github

25
推荐指数
3
解决办法
4万
查看次数

标签 统计

git ×3

github ×1

version-control ×1