【发布时间】:2020-07-07 01:29:29
【问题描述】:
我正在使用 AWS SageMaker,但我不知道 EC2 为我添加到 .gitignore 的 .csv 文件创建了一个检查点,因为它的大小。因此,我不小心添加了要提交的检查点文件。
为了从暂存中删除文件,我通过执行git reset HEAD --hard 执行了硬重置。
我收到以下回复:
HEAD is now at c2770a8 add updates
当我执行git status 时,我被告知如下:
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
于是我提交了git push origin master,遇到如下错误:
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (15/15), 61.39 MiB | 5.80 MiB/s, done.
Total 15 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: cee6ca9f888bed2a49b7bbd5de9edb1a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File data/.ipynb_checkpoints/traffic_crashes-checkpoint.csv is 212.62 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Morgan-Sell/Chicago-Traffic-Risk.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Morgan-Sell/Chicago-Traffic-Risk.git'
(1) 为什么重置没有清除我的暂存?
(2) 我怎么知道c2770a8对应的是什么?
谢谢!
【问题讨论】:
标签: linux git github command-line