- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个本地存储库,有一个大文件被意外添加到其中。现在,即时通讯几乎落后了100次提交。当我尝试推送到GitHub时,它给了我一个错误。
我需要做任何我需要做的事情,以便能够推送此存储库的其余部分。
我不需要此文件,可以将其永久删除
(侧面注意:这是一个包含IPython节点和代码的目录。我有一个脚本自动推送该脚本,这就是为什么我落后了将近100次提交。我只是注意到它未同步)
这是我尝试未成功的尝试:
git status
On branch master Your branch is ahead of 'origin/master' by 100 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
git filter-branch --index-filter 'git rm --cached --ignore-unmatch "Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt"' --tag-name-filter cat -- --all
Rewrite d381c7d5037a6a26abb2b5cef06e57d8b86a398b (95/189)rm 'Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt'
..
Rewrite f639b57714a5d57ff37b9d4a55c1c69fc0b514a8 (176/189)rm 'Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt'
Rewrite 587c8b65f19315ebeb6627a75bd703a5dbdec208 (189/189)Ref 'refs/heads/master' was rewritten
WARNING: Ref 'refs/remotes/origin/master' is unchanged
git rm "Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt"
fatal: pathspec 'Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt' did not match any files
git push
warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, 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.
In Git 2.0, Git will default 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: 841, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (578/578), done.
Writing objects: 100% (835/835), 31.79 MiB | 3.14 MiB/s, done.
Total 835 (delta 196), reused 0 (delta 0)remote: warning: File .git-rewrite/t/Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt is 74.92 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File .git-rewrite/t/Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt is 69.38 MB; this is larger than GitHub's recommended maximum file size of 50.00 MBremote: error: GH001: Large files detected.
remote: error: Trace: f013f5e75b4f35d07de5d2d9ef1116bd
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File .git-rewrite/t/Education/Coursera/Exploratory Data Analysis/Week1/household_power_consumption.txt is 126.80 MB; this exceeds GitHub's file size limit of 100.00 MBTo git@github.com:rbohac/IPython-Notebooks.git ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:rbohac/IPython-Notebooks.git'
最佳答案
确保您的最新提交是正确的,因为BFG会假设这一点,并在重新编写和清除Git历史记录时使用您的最新提交来维护您的仓库状态。 BFG与'git-filter-branch'类似,但它是为更特定的目的而编写的实用程序,而git实用程序功能更广泛,功能更多,但牺牲了运行效率较低的缺点。当我从该来源获得所有这些信息时,请阅读有关BFG的文档以获取更多详细信息。
brew install bfg
bfg --strip-blobs-bigger-than 50M
git rm --cached XYZ
git commit --amend -CHEAD
git push
关于Github-文件XYZ为126.80 MB;这超出了GitHub的文件大小限制100.00 MB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31349508/
你好 StackOverflow。 我在 Github 上遇到了一个奇怪的错误。 存储库 Link 我在 4 个月前创建了一个存储库。并且只向该存储库添加了 2 个贡献者。 • 我没有再添加贡献者但是
我已经配置了 Jenkins Github 拉取请求构建器插件来构建我机构成员提出的每个拉取请求。它就像一个魅力。 但是,构建并没有像在这个不错的 post 中显示的那样将构建状态报告回 github
我只是想知道在任何 GitHub 源代码查看页面上可以查看多少个字符而不会溢出(水平滚动)。 最佳答案 在 OS X v10.9 (小牛队): 谷歌浏览器:125 火狐:122 Safari :121
我一直在寻找可以进入 .github 的事物的零碎示例。 GitHub 存储库上的目录。 我可以看到它用于 GitHub 操作和工作流以及拉取请求和问题模板,但我看不到一个页面,其中概述了您可以在理想
尝试运行 --is-bare-repository 命令,但意识到在我的克隆副本上运行它是不正确的。有没有办法在实际的 GitHub 存储库上使用相同的命令?存储库也没有显示 .git 文件。请原谅我
我正在使用 github 页面和 jekyll 创建一个博客。我想知道是否有一种方法可以将 github 文件(即存储库中的文件)中的代码片段嵌入到博客文章中。我可以在此页面上找到有关嵌入要点的解决方
我在 GitHub 存储库中有一个文件,需要通过运行命令偶尔更新。 作为 GitHub Workflows 的一部分,我想让一个机器人运行一个命令,并查看它是否在 repo 上创建了一个差异,如果是,
尝试从 Github 桌面应用程序发布到 github.com 时出现以下错误。 GitHub Desktop was unable to store the account token in the
类似于Desktop notifications from GitHub (从 10 年前开始)但提出了一个稍微不同的问题 - GitHub 是否支持 web notifications ?我想知道关
我想使用 semantic-release 在 Github 版本上发布整个目录(构建目录),但不幸的是它将每个构建文件作为单个 Assets 发布。 用于复制: 我正在使用 Vue CLI 生成一个
这让我发疯,我知道这听起来像是一个愚蠢的问题,但我已经为此苦苦挣扎了 2 天。我刚刚完成了 Visual Code 的编码,我想将它推送到 github 上。所以我创建了一个名为 mern-maps
在 GitHub 上,一个用户可以属于多个组织。一个存储库是否也可以成为多个组织的一部分? 最佳答案 根据 this blog post by GitHub , 一个仓库只能属于一个组织。 Creat
在 GitHub 操作中,我使用脚本创建了一个文件。然后我可以使用 git 创建一个分支,添加文件,提交文件并将分支推送到 repo。全部使用 git。 然后我想从我的操作中创建一个 PR,所以我使用
在 GitHub 中,当我转到:[Insights] - [Networks] 时,我看到我的分支有不同的颜色。有些在 blue , 其他人在 green .我找不到解释。 有谁知道不同颜色是什么意思
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我只是在尝试 GitHub。 为什么有些提交显示为“一天前在 GitHub 上提交”而其他提交显示为“一天前提交”? 例如这里: https://github.com/apple/swift/comm
有没有办法更改 Github 上的配色方案以进行语法高亮显示?我已经进行了基本搜索,但找不到答案。 最佳答案 目前没有办法改变服务器端的配色方案。 github.com 的几个用户已经要求 自定义语法
Github 上关闭的拉取请求是否意味着拉取请求未合并? 如果没有,有没有办法确定已关闭的拉取请求是否已合并? 谢谢。 最佳答案 If no, is there a way I can determi
不确定这是否与主题无关,但我真的很好奇这种类型的图表是否有名称以及如何创建。 像这样:https://help.github.com/articles/viewing-contributions-on
GitHub 中合作者和贡献者的拉取请求有什么区别?我没有发现合作者有任何特殊特权。 最佳答案 合作者对贡献者的一项特权是......他们(合作者)可以直接推送到您的存储库(因为您拥有 added t
我是一名优秀的程序员,十分优秀!