Skip to content

Instantly share code, notes, and snippets.

View BrambleXu's full-sized avatar

BrambleXu BrambleXu

  • Tokyo
View GitHub Profile
@BrambleXu
BrambleXu / gist:3a69b7017e6f40177ee20a9f382e5a80
Created June 29, 2018 00:34 — forked from jtdp/gist:5443297
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@BrambleXu
BrambleXu / commit-msg-checker.sh
Last active February 13, 2023 08:18 — forked from umutdz/commit-msg-checker.sh
Add your own custom commit message check into git hooks. The checker control commit messages whether correct according to conventional commit .
#!/usr/bin/env bash
if [ ! -x .git/hooks/commit-msg ] || [ ! -f .git/hooks/commit-msg ] || ! cmp ./hooks/commit-msg.sh .git/hooks/commit-msg
then
echo -e "\033[33m Setting Up Git commit Hook..."
mkdir -p .git/hooks/
cp ./hooks/commit-msg.sh .git/hooks/commit-msg
chmod +x .git/hooks/commit-msg
echo -e "\033[32m Done"
echo -e "\033[33m You can make commit now."