Dec
3
git pre-commit hook
vi .git/hooks/pre-commit
转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php 。
#!/bin/bash
function color() {
scheme=$1
shift
echo -e "\e[${scheme}m"$*"\e[0m"
}
rebasing=`git status | grep 'currently rebasing'`
if [ ! -z "$rebasing" ]; then
color '31;43' "currently rebasing, commit not allowed"
echo
exit 1
fi
function color() {
scheme=$1
shift
echo -e "\e[${scheme}m"$*"\e[0m"
}
rebasing=`git status | grep 'currently rebasing'`
if [ ! -z "$rebasing" ]; then
color '31;43' "currently rebasing, commit not allowed"
echo
exit 1
fi
欢迎扫码关注:

转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php 。
Ollama API example
备查:MySQL Client CLI - CTRL+W 只删除一个单词


