Amending your PATH (e.g. for homebrew)

April 29th, 2012 13:32 – by Torsten Trautwein

If you for example want to use Homebrew's version of postgresql instead of the one that ships with OS X Lion, you have to change the sequence of the directories of your PATH.

The hint Homebrew provides is:

Warning: /usr/bin occurs before /usr/local/bin

This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths:

…

To do so, just create a .bash_profile file in your home directory and add the following line:

PATH="/usr/local/bin:$PATH"

The next time you open your shell, you're ready to go.

Changing the origin of a git repository

February 16th, 2012 21:10 – by Torsten Trautwein

If you need to change the origin of your git repository, you can do this quickly by following these steps:

Check out all the branches:

git checkout -t origin/branch
… 

Remove the old origin, add the new one:

git remote rm origin 
git remote add origin git@example.com:repository.git

Push all the master and all the other branches to your new origin:

git checkout master
git push -u origin master

git checkout branch
git push origin branch
… 

Configure some settings for your convenience (as necessary):

git symbolic-ref HEAD refs/heads/master
git remote set-head origin master
git config master.merge refs/heads/master
git config master.remote origin

Done.

Get In Touch

The usual channels

twitter @neowork
Google+ +neowork
github neowork
500px neowork
E-Mail mail@neowork.com

Or send a message right away

captcha

Imprint

Torsten Trautwein
Pfannmuellerstr. 28
60488 Frankfurt am Main, Germany

mail@neowork.com
+49 (0)7000 NEOWORK
+49 (0)7000 63 69 675
max. 0.12 €/min on German landlines