diff --git a/%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81%E6%97%B6%E5%80%99%E7%9A%84%E9%92%A9%E5%AD%90.md b/%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81%E6%97%B6%E5%80%99%E7%9A%84%E9%92%A9%E5%AD%90.md new file mode 100644 index 0000000..9ba2991 --- /dev/null +++ b/%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81%E6%97%B6%E5%80%99%E7%9A%84%E9%92%A9%E5%AD%90.md @@ -0,0 +1,19 @@ +# 1. 确保在正确的分支 +git branch + +# 2. 安装钩子 +curl -o .git/hooks/commit-msg http://101.43.95.130:8082/tools/hooks/commit-msg +chmod +x .git/hooks/commit-msg + +# 3. 重置到提交前状态(如果需要) +git reset HEAD~1 --soft +git commit -m "你的提交信息" + +# 4. 或者修改现有的提交 +git commit --amend --no-edit + +# 5. 查看提交信息确认 +git log -1 + +# 6. 推送 +git push origin HEAD:refs/for/master \ No newline at end of file