Skip to content

Instantly share code, notes, and snippets.

@Pierre-Sassoulas
Last active June 29, 2023 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pierre-Sassoulas/796b6de311d8486010889615f42a6777 to your computer and use it in GitHub Desktop.
Save Pierre-Sassoulas/796b6de311d8486010889615f42a6777 to your computer and use it in GitHub Desktop.
Git alias and template message
sudo apt-get update;sudo apt-get dist-upgrade -y;sudo apt-get -y autoremove;sudo apt-get -y autoclean
sudo apt-get install -y git zsh python3-venv gcc make perl
git config --global core.editor "nano"
git config --global advice.skippedCherryPicks false
git config --global --add --bool push.autoSetupRemote true
git config --global help.autocorrect 1
git config --global pull.rebase true
git config --global fetch.prune true
git config --global diff.algorithm histogram
git config --global alias.sw switch
git config --global alias.rs restore
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.figg diff
git config --global alias.cia commit --amend
git config --global alias.pf push --force-with-lease
git config --global alias.st status
git config --global alias.lg "log --graph --abbrev-commit --pretty=format:'%C(red)%h%Creset -%C(yellow)%d%Creset %s %C(green)(%cr) %C(bold blue)<%an>%Creset'"
git config --global alias.wip "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads"
# git fetch --all --prune&& for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done
git config --global core.filemode false
git config --global submodule.recurse true
git config --global core.excludesfile ~/.gitignore_global
git config --global commit.template ~/.git_commit_msg.txt
git config --global user.email "pierre.sassoulas@gmail.com"
git config --global user.name "Pierre Sassoulas"
cd ~
echo "# [part affected] - If applied, this commit will... (present tense)
# ---------------------------------------------50
# Explain why this change is being made
# -------------------------------------------------------------------72
# Provide links to any relevant tickets, articles or other resources
# -------------------------------------------------------------------72
" > .git_commit_msg.txt
echo ".idea
.project
venv
.coverage
htmlcov"> .gitignore_global
sudo snap install pycharm-community --classic
# sudo apt-get install texlive-xetex vlc gimp
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/g' ~/.zshrc
ssh-keygen -t ed25519 -C pierre.sassoulas@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment