Summary of starting configuration on git 🌱

Β·

2 min read

git config --global user.name "my-name"
git config --global user.email "my@email.com"
git config --global init.defaultBranch main
git config --global diff.colorMoved zebra
git config --global pull.rebase true
git config --global status.short true

You can read generating a new SSH key step by step here.

git config -l
# or
cat ~/.gitconfig

If you are using zsh, update ~/.zshrc with the content:

alias ga="git add ."
alias gc="git commit -m"
alias gs="git status"
alias gd="git diff"
alias gp="git push"
alias p="git cherry-pick"

alias conf="code ~/.zshrc"

If you are using fish shell, update ~/.config/fish/config.fish with the content:

alias g 'git'
alias ga 'git add .'
alias gs 'git status'
alias gc 'git commit -m'
alias gd 'git diff'
alias gp 'git push'
alias p 'git cherry-pick'

alias conf 'code ~/.config/fish/config.fish'

If you are using nushell, update code $nu.config-path with the content:

alias g = git
alias ga = git add .
alias gc = git commit -m
alias gs = git status
alias gd = git diff
alias gp = git push
alias p = git cherry-pick

alias conf = code $nu.config-path