Skip to content

Instantly share code, notes, and snippets.

@kikuchi-m
Last active December 30, 2024 21:41
Show Gist options
  • Select an option

  • Save kikuchi-m/702859ae877a29bef4756132b31fad5c to your computer and use it in GitHub Desktop.

Select an option

Save kikuchi-m/702859ae877a29bef4756132b31fad5c to your computer and use it in GitHub Desktop.
git commands
user.name=Kikuchi Motoki
user.email=wildflower.pink0102@gmail.com
rebase.autosquash=true
diff.context=7
alias.branch-short=for-each-ref --format='%(refname:short)' refs/heads
alias.diffc=diff --cached
alias.fetchp=fetch --prune
alias.graph=log --graph --pretty="%Cred%h%Creset - %Creset%C(yellow)%cN%Creset %Cgreen%d%Creset %s %C(cyan)(%ai - %ar)%Creset" --date=relative --date-order
alias.graphs=graph --remotes HEAD
alias.root=rev-parse --show-toplevel
alias.show-conflicts=merge-tree --message
alias.switchd=switch --detach
alias.untracked=ls-files -o --exclude-standard
merge.tool=vimdiff
init.defaultbranch=main
color.diff.old=197
color.diff.new=114
color.status.updated=114
color.status.changed=197
color.status.untracked=202
color.status.unmerged=197
#!/usr/bin/env bash
git log --graph --pretty="%Cred%h%Creset - %Creset%C(yellow)%cN%Creset %Cgreen%d%Creset %s %C(cyan)(%ai - %ar)%Creset" --date=relative --date-order "$@"
git log --graph --pretty="%%Cred%%h%%Creset - %%Creset%%C(yellow)%%cN%%Creset %%Cgreen%%d%%Creset %%s %%C(cyan)(%%ai - %%ar)%%Creset" --date=relative --date-order %*
#!/usr/bin/env bash
git graph --remotes HEAD "$@"
git graph --remotes HEAD %*
#!/usr/bin/env bash
set -e
BASE=$1
if [ -z "$BASE" ]; then
BASE=origin/master
fi
git fetch -P --force && git log --oneline --merges $(git tag --sort=-committerdate --merged $BASE | head -n 1)..$BASE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment