当前位置:   article > 正文

git错误上传大文件&版本回退_git上传大文件失败 回退了还是不行

git上传大文件失败 回退了还是不行

应该是困扰了很久,gitignore没提前配置好,或者是有些文件没有忽略就git add。

使用git rm –cached . 能删除暂缓区文件,但是重新push一次还是会有先前的文件。

git rm –cached . 

这里我的解决·办法是版本回退:

1. 使用git log回退到最近提交的版本

git log

2. 修改gitignore文件

3. 回退到版本

git reset --soft cf9b9e5058412c56279f02c7b0ea314c81e92000

4. 重新提交

这里我的gitignore文件更新后加上

  1. *.tar.gz
  2. *.gz
  3. *.bin
  4. *.zip

完整 .gitignore

  1. # Byte-compiled / optimized / DLL files
  2. __pycache__/
  3. *.py[cod]
  4. *$py.class
  5. # C extensions
  6. *.so
  7. # Distribution / packaging
  8. .Python
  9. build/
  10. develop-eggs/
  11. dist/
  12. downloads/
  13. eggs/
  14. .eggs/
  15. lib/
  16. lib64/
  17. parts/
  18. sdist/
  19. var/
  20. wheels/
  21. pip-wheel-metadata/
  22. share/python-wheels/
  23. *.egg-info/
  24. .installed.cfg
  25. *.egg
  26. MANIFEST
  27. # PyInstaller
  28. # Usually these files are written by a python script from a template
  29. # before PyInstaller builds the exe, so as to inject date/other infos into it.
  30. *.manifest
  31. *.spec
  32. # Installer logs
  33. pip-log.txt
  34. pip-delete-this-directory.txt
  35. # Unit test / coverage reports
  36. htmlcov/
  37. .tox/
  38. .nox/
  39. .coverage
  40. .coverage.*
  41. .cache
  42. nosetests.xml
  43. coverage.xml
  44. *.cover
  45. .hypothesis/
  46. .pytest_cache/
  47. # Translations
  48. *.mo
  49. *.pot
  50. # Django stuff:
  51. *.log
  52. local_settings.py
  53. db.sqlite3
  54. # Flask stuff:
  55. instance/
  56. .webassets-cache
  57. # Scrapy stuff:
  58. .scrapy
  59. # Sphinx documentation
  60. docs/_build/
  61. # PyBuilder
  62. target/
  63. # Jupyter Notebook
  64. .ipynb_checkpoints
  65. # IPython
  66. profile_default/
  67. ipython_config.py
  68. # pyenv
  69. .python-version
  70. # pipenv
  71. # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
  72. # However, in case of collaboration, if having platform-specific dependencies or dependencies
  73. # having no cross-platform support, pipenv may install dependencies that don’t work, or not
  74. # install all needed dependencies.
  75. #Pipfile.lock
  76. # celery beat schedule file
  77. celerybeat-schedule
  78. # SageMath parsed files
  79. *.sage.py
  80. # Environments
  81. .env
  82. .venv
  83. env/
  84. venv/
  85. ENV/
  86. env.bak/
  87. venv.bak/
  88. # Spyder project settings
  89. .spyderproject
  90. .spyproject
  91. # Rope project settings
  92. .ropeproject
  93. # mkdocs documentation
  94. /site
  95. # mypy
  96. .mypy_cache/
  97. .dmypy.json
  98. dmypy.json
  99. # Pyre type checker
  100. .pyre/
  101. *.tar.gz
  102. *.gz
  103. *.bin
  104. *.zip

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/794731
推荐阅读
相关标签
  

闽ICP备14008679号