1、
我用的远程仓库是oschina,当然你也可以选择其他的远程仓库,第一步我们先在远程资源库上创建一个仓库
2、
点击创建之后,就可以在本地资源库创建仓库。任意创建一个文件夹,我的位置在F:\gitrespose在此处打开git bash
(1)如果是第一次使用建议你配置一下自己的个人信息
git config --global user.name "俩个人"
git config --global user.email "[email protected]"
(2)创建一个文件夹test
mkdir test
(3)进入文件夹,并初始化
cd test
git init
(4)然后把你需要上传到远程仓库的项目拷贝到这个目录下
(5)把项目添加到本地仓库
git add test
git commit -m "first commit"
(6)然后链接到远程仓库
git remote add origin https://git.oschina.net/lgr123/stxt.git
(7)如果本地和远程不一样执行
git pull --rebase origin master
(8)最后push
git push -u origin master