Skip to content

Instantly share code, notes, and snippets.

@felipecrs
Last active October 13, 2019 18:05
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 felipecrs/4f83a18efa08837b0153f86358b9a6ea to your computer and use it in GitHub Desktop.
Save felipecrs/4f83a18efa08837b0153f86358b9a6ea to your computer and use it in GitHub Desktop.
Set up Git

Editor: (do not forget to tick "Add to PATH" option on VS Code installation

git config --global core.editor "code --wait"

Diff:

git config --global -e

Add or replace with the following:

[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE

Merge:

git config --global -e

Add or replace with the following:

[merge]
    tool = vscode
[mergetool "vscode"]
    cmd = code --wait $MERGED

At end, should look like this:

[core]
	editor = code --wait
[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE
[merge]
    tool = vscode
[mergetool "vscode"]
    cmd = code --wait $MERGED

Another tip: git hist https://gist.github.com/edysegura/3e7f8f5ee4f5d287cd3a5d4efd9bbb59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment