Fish and chips: setting up git aliases in fish-shell

Fish-shell is my favorite shell.
Setting init commands for fish differs from the other shells. You need to add command to ~/.config/fish/config.fish.

For example, you can add following useful aliases for git:

1
2
3
4
5
alias st='git status'
alias di='git diff'
alias log='git log -10 --oneline'
alias push='git push'
alias pull='git pull'

Here is a copy-paste snippet to run in the shell:

1
2
3
4
5
6
7
echo "
# git aliases
alias st='git status'
alias di='git diff'
alias log='git log -10 --oneline'
alias push='git push'
alias pull='git pull'" >> ~/.config/fish/config.fish