如何放弃所有尚未推送的git提交,然后强制git不提交数据/目录中的任何内容?无法从git commit中删除文件
我试图强制覆盖从我的c9.io项目存储在github上的项目的所有更改。我不小心加入了一些mongodb数据文件。我试图将数据/目录添加到.gitignore。我从github中获取更新的.gitignore,但是当我尝试和git push时,data /中的这些顽固文件仍然处于提交状态。我也试过git reset,git rebase,git clean和this,我把dmpfile.sql改成了pi/data/node-login.1。
请帮我已经在这几个小时,我真的很沮丧
Counting objects: 15, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 150.22 KiB | 92 KiB/s, done.
Total 13 (delta 6), reused 0 (delta 0)
remote: warning: File pi/data/local.0 is 64.00 MB; this is larger than GitHub's recommended maximum file size of 50 MB
remote: warning: File pi/data/node-login.0 is 64.00 MB; this is larger than GitHub's recommended maximum file size of 50 MB
remote: error: GH001: Large files detected.
remote: error: Trace: e6ade98208c08b634ed28aefea36dfbb
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File pi/data/node-login.1 is 128.00 MB; this exceeds GitHub's file size limit of 100 MB
To [email protected]:bobbyg603/goddard.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:bobbyg603/goddard.git'
的.gitignore:
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
data/
pids
logs
results
npm-debug.log
node_modules
.project
.settings
感谢, 鲍比
显示你的** ** gitignore规则。 –
正在更新... – bobbyg603
您链接到一个页面,该页面讨论使用'git filter-branch'从您的历史记录中删除文件。这是正确的方法。你对这个过程有什么问题? – Chris