Last Updated: September 27, 2021
·
715
· andxyz

Difftool diffks

git diffks master

Someone (https://coderwall.com/p/o42nvq) 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 http://www.kaleidoscopeapp.com/
which really helps me figure out what the hell is going on sometimes

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

[color]
    ui = auto

[push]
    default = matching

[alias]
    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
    # http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
    ctags = !.git/hooks/ctags

[merge]
    keepBackup = false;
    tool = p4merge

# perforce p4merge setup as the mergetool
# http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools
# the gist https://gist.github.com/toolbear/861192
# the p4merge.sh ~/bin/p4merge
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
    keepTemporaries = false
    trustExitCode = false
    keepBackup = false

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

[difftool]
    prompt = false

[init]
    templatedir = ~/.git_template

# Thanks to http://twitter.com/rtomayko/status/199572965434728448
# https://gist.github.com/2601550#
# `git help -w`
#
# The new git-scm.com site includes man pages designed for pleasant viewing in a web browser:
# http://git-scm.com/docs
#
# 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 http://git-scm.com/docs/$(basename $1 .html)' --
[help]
    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.