Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use gitconfig-user more widely and sensibly.

  • Loading branch information...
commit 1d3edc82273df719e9d2c545914c4b246839251c 1 parent 26a2d68
@mikemcquaid authored
Showing with 15 additions and 6 deletions.
  1. +2 −0  gitconfig
  2. +7 −4 gitconfig-user
  3. +4 −0 install-dotfiles.sh
  4. +2 −2 shrc.sh
View
2  gitconfig
@@ -78,6 +78,8 @@
patience = !git noff -Xpatience
# Hard reset branch to the upstream version.
hard-reset = !git reset --hard origin/$(git current-branch)
+ # Reset the current repository to the state on mikebook (my MacBook Pro) and clean it.
+ mikebook = !git fetch mikebook && git reset --hard mikebook/master && git clean -xdf
## Shortened 'New' Commands
rem = !git rebase-against-master
View
11 gitconfig-user
@@ -3,9 +3,12 @@
name = Mike McQuaid
# Email used in commit messages.
email = mike@mikemcquaid.com
+[shell]
+ # Default SSH username.
+ username = mike
+[sourceforge]
+ # SourceForge username.
+ username = mikemcquaid
[github]
- # Set my GitHub username for command-line tools.
+ # GitHub username for command-line tools.
user = mikemcquaid
-[alias]
- # Reset the current repository to the state on mikebook (my MacBook Pro) and clean it.
- mikebook = !git fetch mikebook && git reset --hard mikebook/master && git clean -xdf
View
4 install-dotfiles.sh
@@ -26,6 +26,10 @@ for DOTFILE in *; do
[ -d $DOTFILE ] && DOTFILE="$DOTFILE/"
DIRFILE="$DOTFILESDIR/$DOTFILE"
+ # Don't install gitconfig-user unless you're also called Mike.
+ echo $DOTFILE | grep -q 'gitconfig-user' \
+ && echo $USER | grep -vq 'mike' && continue
+
echo $DOTFILE | grep -q 'dotfiles' && continue
echo $DOTFILE | grep -q 'sublime' && HOMEFILE="$SUBLIME" \
View
4 shrc.sh
@@ -105,7 +105,7 @@ alias less="less --ignore-case --raw-control-chars"
alias rsync="rsync --partial --progress --human-readable --compress"
alias be="bundle exec"
-export HOMEBREW_SOURCEFORGE_USERNAME="mikemcquaid"
+export HOMEBREW_SOURCEFORGE_USERNAME="$(git config sourceforge.username)"
alias upbrew="scp-to-http.sh $HOMEBREW_SOURCEFORGE_USERNAME,machomebrew frs.sourceforge.net /home/frs/project/m/ma/machomebrew/Bottles /Library/Caches/Homebrew/"
alias svn="svn-git.sh"
@@ -144,7 +144,7 @@ then
alias agdu="sudo apt-get dist-upgrade"
elif [ $WINDOWS ]
then
- quiet_which plink && alias ssh="plink -l mike"
+ quiet_which plink && alias ssh="plink -l $(git config shell.username)"
alias ls="ls -F --color=auto"
Please sign in to comment.
Something went wrong with that request. Please try again.