Category Archives: Git

Configuring diff tool with .gitconfig?

Questions: How do I configure git to use a different tool for diffing with the .gitconfig file. I have this in my .gitconfig: [diff] tool = git-chdiff #also tried /bin/git-chdiff and it does not work, it just open the regular command line diff. When I do export GIT_EXTERNAL_DIFF=git-chdiff then git diff will open up the… Read More »

Git hook to send email notification on repo changes

Questions: How do I configure the appropriate Git hook to send a summary email whenever a set of changes is pushed to the upstream repository? Answers: Another, more modern way to do this is with git-multimail, as suggested by Chords below. This is how you did it in 2009. You could add something like this… Read More »

Visual Studio 2013 git, only Master branch listed

Questions: I’m using Visual Studio 2013’s Git support to work on a private GitHub repository. I have permission to commit to it. I want to switch branches, but when I go to the Branches view, the only branch in any of the lists (branch drop-down, published branches, merge tool) is master. Other branches show up… Read More »

Install specific git commit with pip

Questions: I’m developing a django app and I’m using pip to manage my requirements. How can I do to install a specific git’s commit? In my case I need to install this commit: Answers: You can specify commit hash, branch name, tag. For the branch name and the tag, you can also install a… Read More »

Best way to add Gradle support to IntelliJ Project

Questions: I have looked around quite a bit and haven’t found the best solution to convert an existing IntelliJ project to Gradle. I work in a team environment and we currently share the .ipr file as we have a few build configurations that we track. We will be getting rid of those in favor of… Read More »

Category: Git

Using .gitignore to ignore everything but specific directories

Questions: My issue is that I have a bunch of WordPress websites in my git repo, of which I want to selectively commit only the content of my themes folders, while ignoring the rest of the redundant files found in WordPress. I’ve used .gitignore files to ignore file types before, but can it be used… Read More »