Eddorre.com

Displaying Git Branch Name with Bash at Command Line

Sunday December 21, 2008 02:11 | comment icon 1 Comment

  • Tags:
  • bash
  • git

When you’re first introduced to Git, you’ll probably just be working in your master branch, but eventually you’ll want to test some experimental feature in your code base without disturbing the master branch. Git makes this a snap to do with the command “git checkout -b branchname”.

If you’re working on a few experimental features at a time, each with their own branch name, it gets a little confusing as to which branch you’re currently working in. Of course, you could just type in the commands “git branch” or “git status” but there is an easier way to keep track of what branch you’re actively working in.

Continue Reading Continue Reading

Navigating the Command Line in Terminal.app

Sunday December 21, 2008 01:38 | comment icon 0 Comments

  • Tags:
  • bash
  • terminal
  • mac

I recently switched back to using Apple’s built in Terminal.app (I was using iTerm previously) program for all of my command line needs. There are tons of keyboard shortcuts when you’re using bash but there are a few that are especially handy to have memorized.

  • CTRL-A: Goes to the beginning of the line
  • CTRL-E: Goes to the end of the line

Sometimes you want to get to the middle of the line instead of heading to the beginning or to the end. These will help:

  • OPTION/ALT-B: Jumps cursor back
  • OPTION/ALT-F: Jumps cursor forward

There is one caveat though. The first time I tried the OPTION key trick, the Terminal would just type in strange characters. In order to get Terminal to recognize the OPTION/ALT key as a command key you have to check the option for “Use option as meta key” in the preferences pane of the Terminal app. Once that is done, the Option key shortcuts will work.

Terminal Preferences

Thanks to Alex (aka @demonbane) for showing me this trick.

There are ton of shortcuts for the bash shell but these are among my favorites/most used.

Moving from Subversion to Git & GitHub

Monday December 08, 2008 00:26 | comment icon 0 Comments

  • Tags:
  • subversion
  • git
  • github

Although Git has been making the rounds in social media for a while, it really caught my attention this year at RailsConf with Scott Chacon’s presentation; Getting Git.

After RailsConf and throughout the summer, I was determined to learn more about the fledgling revision control system but something always came up to squash that effort.

Luckily, Planet Argon uses Git exclusively for their version control system and it’s allowed me to learn some of the basics via my favorite learning technique; trial by fire.

Continue Reading Continue Reading

end kanji