Git常用命令

由 碎念_Nian 发布

首次提交

git init
git add .
git commit -m "Update"
git remote add origin https://github.com/NianBroken/ZFCheckScores.git
git push origin main --force

非首次提交

git add .
git commit -m "Update"
git push origin main --force

克隆仓库

git clone https://github.com/NianBroken/ZFCheckScores

克隆仓库的指定分支

git clone -b OldMain https://github.com/NianBroken/ZFCheckScores

回退

git reset --hard 3f0370b64f8bb7dc07fa210e1c24ab34940f30a0
git push origin HEAD:main --force