OSX Terminal – Tab and window shortcuts

In a previous post, I shared a tip on Naming your Terminal tabs in OSX Lion. I’ve been meaning to share some additional shortcuts that I use day-to-day for opening new tabs and renaming them via the command line. The workflow We can rename tabs and windows as before: # Rename tab tabname “Funky Tab” […]

Git add -A and git commit one liner

When working with Git, I often find myself typing: git add -A && git commit -m “My commit message” This stages any changes including new files (which “git commit -am” doesn’t), marks any files that have been deleted from the working copy as removed and commits to the repository. Following a quick Google search, and […]

Quickly pushing your public SSH key to a server

I find myself needing to do this on a regular basis, so here’s a handy snippet for adding your public SSH key to a server’s authorized_keys file, assuming your public key is at “~/.ssh/id_rsa.pub” (the default). ssh user@host “echo ‘`cat ~/.ssh/id_rsa.pub`’ >> ~/.ssh/authorized_keys” …or pop this in your ~/.profile file: function push-key { ssh $1 […]

Naming your Terminal tabs in OSX Lion

If you find yourself in the Terminal app with a bunch of tabs open, the default name of “bash” isn’t very useful when navigating between them. You can change the tab name via the UI by right clicking the tab, then clicking “Inspect Tab” and changing the window or tab names but this is somewhat […]

Git – setting up a remote repository and doing an initial push

There is a great deal of documentation and many posts on Git out there, so this is more of a note to self as I keep forgetting the steps needed to set up a remote repository and doing an initial “push”. So, firstly setup the remote repository: ssh git@example.com mkdir my_project.git cd my_project.git git init […]