Push code to a remote server
shpeacelover
posted @ 2014年4月29日 17:42
in Git
, 385 阅读
1. 如果之前已经有了一个original source, 应该先git remote rm origin
2. set up the remote repository:
mkdir my_project.git
cd my_project.git
git init --bare
git update-server-info # If planning to serve via HTTP
3. on local machine:
cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master
blog comments powered by Disqus