This commit is contained in:
renjianbo
2026-01-05 11:22:56 +08:00
parent 1fdcfe008a
commit d94404f8e7
3 changed files with 20 additions and 1 deletions

View File

@@ -1 +0,0 @@
ss

View File

@@ -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

View File

@@ -65,6 +65,7 @@ nav:
- 学习笔记/生成并配置SSH密钥、克隆仓库.md
- 学习笔记/git设置用户名和邮箱.md
- 学习笔记/git同步远程分支总结.md
- 学习笔记/提交代码时候的钩子.md
- 学习笔记/MkDocs 是什么.md
# Markdown扩展