Skip to content

Instantly share code, notes, and snippets.

@sankalpmukim
Last active October 30, 2025 06:59
Show Gist options
  • Select an option

  • Save sankalpmukim/d63b1a2775170a79b452f5976e143449 to your computer and use it in GitHub Desktop.

Select an option

Save sankalpmukim/d63b1a2775170a79b452f5976e143449 to your computer and use it in GitHub Desktop.
configure_git_aliases.sh
#!/bin/bash
# Configure Git aliases
git config --global alias.co commit
git config --global alias.br branch
git config --global alias.st status
git config --global alias.ps push
git config --global alias.pl pull
git config --global alias.dc 'checkout -- .'
git config --global alias.list 'config --get-regexp ^alias\.'
git config --global alias.unstage 'reset HEAD --'
git config --global alias.ch checkout
git config --global alias.ad 'add .'
git config --global alias.lg 'log --decorate --graph --all'
git config --global alias.lgo 'log --decorate --graph --all --oneline'
git config --global alias.rv 'remote -v'
git config --global alias.drb '!f() { git branch -d "$1" && git push origin --delete "$1"; }; f'
echo "Git aliases have been configured. You can view them by running *git list*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment