Thursday 22 November 2012

Add current directory as new remote git repo

A note to self.

This command line is used to add an existing local git repo to a newly created remote one using the current directory name as the repo name. Note spaces are removed.

NAME=`basename "\`pwd\`" | tr -d ' '` && git remote add origin git@<replace_with_your_host>:$NAME && git push origin master && git pull origin master

The original post that helped with the actual process is:

No comments: