Skip to content

Commit

Permalink
More minimal approach
Browse files Browse the repository at this point in the history
Because the "include" feature of gitconfig was not introduced until
git version 1.7.10, many machines would be required to upgrade git to be
able to use the original version.

The approach here uses a much more minimal approach, assuming that you
can create your own .gitconfig.local in your home directory (just like
.vimrc.local, etc), that dotmatrix has no awareness of.

The git include directive ignores files if they aren't present, so this
should work everywhere.
  • Loading branch information
jgdavey authored and biscuitvile committed Oct 2, 2012
1 parent c89acd0 commit fa568a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
9 changes: 7 additions & 2 deletions .gitconfig
Expand Up @@ -24,10 +24,10 @@
excludesfile = ~/.cvsignore
editor = vim
whitespace = warn
[github]
user = hashrocketeer
[help]
autocorrect = 10
[include]
path = ~/.gitconfig.local
[interactive]
singlekey = true
[merge]
Expand All @@ -52,3 +52,8 @@
default = tracking
[rebase]
autosquash = true
[user]
email = dev@hashrocket.com
name = "Hashrocket Workstation"
[include]
path = .gitconfig.local
5 changes: 0 additions & 5 deletions .gitconfig.local

This file was deleted.

11 changes: 1 addition & 10 deletions bin/hlink
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
require 'fileutils'

EXCLUDES = %w(bin custom . .. .git README.md .gitconfig.local)
EXCLUDES = %w(bin custom . .. .git README.md)

def cwd
@cwd ||= File.expand_path(File.dirname(__FILE__))
Expand Down Expand Up @@ -80,12 +80,3 @@ directories_at(File.join(root,'custom')).each do |custom|
install(file,dest_dir)
end
end

# install .gitconfig.local if needed
unless File.exist?(@home + '/.gitconfig.local')
FileUtils.cp '.gitconfig.local', @home + '/.gitconfig.local'
puts %q{
Generic Hashrocket Git credentials have been configured in ~/.gitconfig.local.
Replace this with your own info if this is a personal machine.
}
end

0 comments on commit fa568a4

Please sign in to comment.