git创建远程仓库并推送本地项目到远程仓库
转载
原文地址:http://blog.csdn.net/ganggexiongqi/article/details/7049914
There is a great deal of documentation and many posts on Git out there, so this is more of a note to self as I keep forgetting the steps needed to set up a remote repository and doing an initial “push”.
So, firstly setup the remote repository:
ssh git@example.com
mkdir my_project.git
cd my_project.git
git init --bare
git update-server-info # If planning to serve via HTTP
exit
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
Done!
在本地仓库添加一个远程仓库,并把本地仓库master分支跟踪到远程分支
- $ git remote add origin ssh://xxx@192.168.1.32/~/workspace/code_celloct/gittest
- $ git push origin master
    博客里大都是转载的内容,其目的主要用户知识的组织和管理。
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号