如何丢弃所有尚未推送的git commit,然后强制git在data /目录中不提交任何内容?
我试图从我的c9.io项目强制覆盖对存储在github上的项目的所有更改。我不小心git添加了一些mongodb数据文件。我试图将data /目录添加到.gitignore。我从github拉出以获取更新的.gitignore,但是当我尝试和git push时,data /中的这些顽固文件仍处于提交阶段。我还试图GIT中复位,GIT中底垫,GIT中清洁和这其中我改变dmpfile.sql到pi /数据/节点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 git@github.com:bobbyg603/goddard.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:bobbyg603/goddard.git'
.gitignore:
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
data/
pids
logs
results
npm-debug.log
node_modules
.project
.settings
谢谢,鲍比