My .bash_profile
In case anyone is interested. The meat of it is a bunch of two-letter aliases for common Git commands. My favorite part, though, is the shortcut to SSH into the iMac. My iMac has an equivalent alias to SSH into my MacBook. Makes it super easy to login and push whatever I was working on back to the server, if I’d forgotten to after switching computers.
Oh, and this isn’t in my profile, but just learned this trick last week and which I had known about it years ago. In OS X, ‘open ./’ opens the current directory in Finder.
!/bin/bash
This is the preferred file for running init commands
This file will be run on any login
echo echo "######################################" echo "# #" echo "# Welcome to Jim's Macbook #" echo "# #" echo "######################################" echo
setting up bash completion
source ~/.git-completion.sh GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 export GIT_PS1_SHOWDIRTYSTATE export GIT_PS1_SHOWSTASHSTATE export GIT_PS1_SHOWUNTRACKEDFILES
PATH=$PATH:/Users/jkubicek/bin export PATH
PS1='[\e[1;32m]$(__git_ps1 " (%s)")[\e[m]' PS1="[\e[1;36m]\h:\W[\e[m]$PS1[\e[1;36m]> [\e[m]" export PS1
alias ls='ls -G' alias imac='ssh jimk@imac.local' alias gc='git commit -m' alias ga='git add .' alias gs='git status' alias grso='git remote show origin' alias gl='git log --oneline --graph'
Updated: I added a bunch of stuff related to git autocomplete, in light of my recent post.