Last Updated: September 27, 2021
· andxyz

Difftool diffks

git diffks master

Someone ( on here had the tip I need to stop getting the annoying prompt from my difftool.

I'll just pastebomb my ~/.gitconfig in the hopes someone will get some use out of my settings.
I have yet to setup my dotfiles on github due to the headache that is privacy and security when sharing settings.

This is one more reason I really should just work hard at it one night instead of playing starcraft2, or natural selection 2, or left4dead 2... or any other computer game that ends in 2... CS:GO?

I type git diffks master it shows up in
which really helps me figure out what the hell is going on sometimes

    pager = less -FRSX
    editor = subl -n -w
    excludesfile = /Users/andxyz/.gitignore_global
    autocrlf = input

    ui = auto

    default = matching

    last = log -1 HEAD
    unstage = reset HEAD --
    log1  = log -10 --color --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n'
    log2 = log -p
    log3  = log --color --all --graph --topo-order --pretty='format: %Cgreen%h%Creset %s%Cred%d%Creset%n'
    log4 = log --graph --decorate --pretty=oneline --abbrev-commit
    log5 = log --graph --decorate --pretty=oneline --abbrev-commit --all
    #amend = commit --amend -C HEAD
    st = status
    br = branch
    co = checkout
    ls = ls-files
    #apply-stash-to-dirty-working-tree = !git stash show -p | git apply && git stash drop
    diffks = difftool --tool=ksdiff
    diffpretty = !/Users/andxyz/bin/pretty-diff/pretty-diff.js
    ctags = !.git/hooks/ctags

    keepBackup = false;
    tool = p4merge

# perforce p4merge setup as the mergetool
# the gist
# the ~/bin/p4merge
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
    keepTemporaries = false
    trustExitCode = false
    keepBackup = false

[difftool "ksdiff"]
    cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"

    prompt = false

    templatedir = ~/.git_template

# Thanks to
# `git help -w`
# The new site includes man pages designed for pleasant viewing in a web browser:
# The commands below can be used to configure git to open these pages when
# using `git help -w <command>' from the command line. Just enter the config
# commands in your shell to modify your ~/.gitconfig file.
[browser "gitscm"]
    cmd = /bin/sh -c 'open$(basename $1 .html)' --
    browser = gitscm

Some other zsh alias I have

# git
alias gb='git branch -a -v'
alias gs='git status'
alias ga='git add -A'
alias gl='git branch -lav'
alias gd='git diffks master'
alias gco='git checkout'

Good luck with your git fu. It's worth it.