Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Wednesday, October 10, 2012

Use Meld as a diff tool for git

To view git diff through meld, my favorite diff viewing tool, do the following:

  1. Write a small script in ~/bin/gitdiff, or wherever you like to store your scripts
    #!/bin/bash
    meld $2 $5


  2. git config --global diff.external ~/bin/gitdiff
Done!

Monday, May 21, 2012

Workaround for ssh session git pushes failing

$ git push origin master

(gnome-ssh-askpass:22648): Gtk-WARNING **: cannot open display:

This occurs because the SSH_ASKPASS environment variable is set to "/usr/libexec/openssh/gnome-ssh-askpass", which is the nice gtk window that pops up when you're running gnome. I don't want this, because I do most of my work over SSH, so simply change SSH_ASKPASS to something else. In my ~/.bashrc
alias git="SSH_ASKPASS='' git"

Then: $ source ~/.bashrc

Fixes it up.