Skip to content

Instantly share code, notes, and snippets.

@Pierre-Sassoulas
Last active October 30, 2025 21:02
Show Gist options
  • Select an option

  • Save Pierre-Sassoulas/796b6de311d8486010889615f42a6777 to your computer and use it in GitHub Desktop.

Select an option

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 init.defaultBranch main
git config --global advice.skippedCherryPicks false
git config --global --add --bool push.autoSetupRemote true
git config --global help.autocorrect prompt
git config --global column.ui auto
git config --global branch.sort -committerdate
git config --global pull.rebase true
git config --global rerere.enabled true
git config --global rerere.autoupdate true
git config --global push.followTags true
git config --global fetch.prune true
git config --global fetch.pruneTags true
git config --global fetch.all true
git config --global tag.sort version:refname
git config --global diff.algorithm histogram
git config --global diff.colorMoved plain
git config --global diff.mnemonicPrefix true
git config --global diff.renames true
git config --global merge.conflictstyle zdiff3
git config --global commit.verbose true
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 "[email protected]"
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
venv
.coverage
htmlcov"> .gitignore_global
echo "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" > ~/.ssh/known_hosts
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 [email protected]
cat .ssh/id_ed25519.pub
echo "Add this ssh key in github settings: https://github.com/settings/ssh/new"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment