Tuesday, December 17, 2013

git: connect local repository to remote repository

On my local machine, run “git init”, which can create the git repository on my local.

To connect my local repository with the remote repository, such like the one on github

git remote add origin https://github.com/hairinwind/myRest.git

This command can push the changes from local to remote

git push -u origin master

This can pull from remote to local

git pull origin master

No comments:

Post a Comment