Skip to content

Instantly share code, notes, and snippets.

@tristan0x
Last active October 6, 2017 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristan0x/df2c087eea10c5bfda98a29f7ad06ea1 to your computer and use it in GitHub Desktop.
Save tristan0x/df2c087eea10c5bfda98a29f7ad06ea1 to your computer and use it in GitHub Desktop.
Git Tip & Tricks

Install latest git

On Ubuntu:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade

Show diff while editing commit message

When writing a commit message, sometimes you would like to have another window with a git diff --staged just to make sure to not forget something. the commit.verbose option allows you to have this output right in the commit window.

git config --global commit.verbose "true"

More information in the manual

Sign commits with GPG

git config --global.signingKey "06F61CF5"
git config --global commit.gpgsign "true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment