<commit_before>##########
# template
openfile () {
  case "$1" in
  foo)
    subl /home/path/to/foo.json
    ;;
  bar)
    eclipse /home/path/to/bar.java
    ;;

  *)
    echo $"Usage: openfile {foo|bar}"
  exit 1

  esac
}

##########
# misc
alias ..='cd ..'
alias mongostart='sudo service mongod start'
alias mongostop='sudo service mongod stop'

##########
# git
alias ga='git add .'
alias gb='git branch'
alias gcreate='git checkout -b'
alias gd='git diffsofancy'
alias gdc='git diff --cached'
alias gl='git log'
alias go='git checkout'
alias goc='git add . && git commit -m "temp" && git checkout'
alias gr='git reset --soft HEAD~1 && git reset'
alias gs='git status'
alias got='git'
alias gut='git'

alias grebase='git rebase origin/master'
alias grabort='git rebase --abort'
alias grcontinue='git rebase --continue'
alias gdelete='git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d'

greset () { git reset HEAD~$1; }

##########
# git advanced
alias gac='git add . && git commit -m "a"'
alias gp='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git pull origin $BRANCH; };f'
alias gpush='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git push -u origin $BRANCH; };f'
alias gpushf='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git push -u origin $BRANCH -f; };f'

[alias]
    squash = "!f() { git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"

    fixup = "!f() { MESSAGE=\"$(git log -n 1 --pretty=format:"%H")\"; BRANCH=\"$(git rev-parse --abbrev-ref HEAD)\"; git add . && git commit --fixup $MESSAGE && git push -u origin $BRANCH ; };f"

    fixuppush = "!f() { BRANCH=\"$(git rev-parse --abbrev-ref HEAD)\"; git commit -a --amend -C HEAD && git push -u origin $BRANCH -f ; };f"

    repull = "!f() { BRANCH=\"$(git symbolic-ref --short HEAD)\"; git fetch origin $BRANCH; git branch -D __backup; git checkout -b __backup; git branch -D $BRANCH; git checkout $BRANCH; };f"

    diffsofancy = "!f() { git diff --color ${1} | diff-so-fancy  | less --tabs=4 -RFX; }; f"<commit_msg>add more aliases<commit_after>##########
# template
openfile () {
  case "$1" in
  foo)
    subl /home/path/to/foo.json
    ;;
  bar)
    eclipse /home/path/to/bar.java
    ;;

  *)
    echo $"Usage: openfile {foo|bar}"
  exit 1

  esac
}

##########
# misc
alias ..='cd ..'
alias mongostart='sudo service mongod start'
alias mongostop='sudo service mongod stop'

##########
# git
alias ga='git add .'
alias gb='git branch'
alias gcreate='git checkout -b'
alias gd='git diffsofancy'
alias gdc='git diff --cached'
alias gl='git log'
alias go='git checkout'
alias goc='git add . && git commit -m "temp" && git checkout'
alias gr='git reset --soft HEAD~1 && git reset'
alias gs='git status'
alias got='git'
alias gut='git'

alias grebase='git rebase origin/master'
alias grabort='git rebase --abort'
alias grcontinue='git rebase --continue'
alias gdelete='git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d'

greset () { git reset HEAD~$1; }

##########
# git advanced
alias gac='git add . && git commit -m "a"'
alias gp='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git pull origin $BRANCH; };f'
alias gpush='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git push -u origin $BRANCH; };f'
alias gpushf='f(){ BRANCH="$(git rev-parse --abbrev-ref HEAD)"; git push -u origin $BRANCH -f; };f'

[alias]
    squash = "!f() { git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"

    fixup = "!f() { MESSAGE=\"$(git log -n 1 --pretty=format:"%H")\"; BRANCH=\"$(git rev-parse --abbrev-ref HEAD)\"; git add . && git commit --fixup $MESSAGE && git push -u origin $BRANCH ; };f"

    fixuppush = "!f() { BRANCH=\"$(git rev-parse --abbrev-ref HEAD)\"; git commit -a --amend -C HEAD && git push -u origin $BRANCH -f ; };f"

    repull = "!f() { BRANCH=\"$(git symbolic-ref --short HEAD)\"; git fetch origin $BRANCH; git branch -D __backup; git checkout -b __backup; git branch -D $BRANCH; git checkout $BRANCH; };f"

    diffsofancy = "!f() { git diff --color ${1} | diff-so-fancy  | less --tabs=4 -RFX; }; f"


alias ystart='yarn start'
alias yadd='yarn add'
alias mongostart='sudo service mongod start'
alias mongostop='sudo service mongod stop'
alias ..='cd ..'

alias pretty='prettier --use-tabs false --print-width 80 --tab-width 2 --single-quote true --trailing-comma es5 --bracket-spacing true --jsx-bracket-same-line false --parser babylon --semi false --write "/home/user/path/**/*.js"'
{'fraction_non_alphanumeric': 0.2047001976718647, 'fraction_numerical': 0.005271249725455744, 'mean_word_length': 3.455968688845401, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1255540', 'n_tokens_mistral': 1722, 'n_tokens_neox': 1624, 'n_words': 541}