测试
This commit is contained in:
@@ -1 +0,0 @@
|
||||
ss
|
||||
19
docs/学习笔记/提交代码时候的钩子.md
Normal file
19
docs/学习笔记/提交代码时候的钩子.md
Normal 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
|
||||
Reference in New Issue
Block a user