Git 常用命令:強制更新、強制推送、跳過驗證、更新子模塊


  1. 放棄本地修改強制更新
git fetch --all
git reset --hard origin/develop
  1. 更新子模塊
git submodule update --remote
  1. 更新代碼
git pull origin develop
  1. 提交代碼
git status
git add .
git commit -m "xxx"
git pull origin develop
git push origin develop
  1. 回滾到指定commit
git reset --hard commit_id
  1. 跳過代碼自動檢查(慎用)
git push origin develop --no-verify
  1. 強制推送(慎用)
git push origin develop -u -f


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM