命令行模式
同步远程repo到本地
$ cd your-github-repo-site
$ git clone [https://github.com/repo] [localfolder]
提交代码到Github的命令步骤
1. cd 到本地代码文件夹
2. git add -A **<将本地所有文件加入提交队列>**
3. git commit -m "" **<将提交队列中的文件全部提交,并附带提交message>**
4. git push **<将提交的任务push上传到Github对应的repo中>**
删除本地文件并提交到远程的命令步骤
1. git -rm -r [本地文件/文件夹]
3. git commit -m "" **<将提交队列中的文件全部提交,并附带提交message>**
4. git push **<将提交的任务push上传到Github对应的repo中>**
同步远程仓库
- 从远程分支拉取代码到本地
git pull upstream master - push到自己的库里
git push origin master
参考链接:github实现本地仓库与远程仓库同步
IDE开发模式
图解Eclipse提交项目到GitHub上
点击查看百度经验贴 【图解Eclipse提交项目到GitHub上】
强制更新eclipse中的项目到remote节点上