Tuesday, May 17, 2011

Git – setting local repo and pushing to new remote

Initialize local git repository
git init

Add and commit all the files to the local repo
git add *
git commit -m 'nick - git init'

Create your remote repository


Locally add your remote repository
git remote add origin

Locally setup tracking so we can do 'git pull' rather than 'git pull origin master'
git branch --set-upstream master origin/master

No comments: