github使用

1. 删除远程仓储(仅在需要修改到一个新的远程的情况下)

git remote rm origin

2.建立git仓库 ,cd到你的本地项目根目录下,执行git命令

git init

3.将项目的所有文件添加到仓库中

git commit -m "注释语句"

4.去github上创建一个自己的Repository,拿到创建的仓库的https地址

5.将本地的仓库关联到github上

git remote add origin https://github.com/s010101/calibration_kalibr

6.上传github之前,要先pull一下,执行如下命令:

git pull origin master

7.上传代码到github远程仓库

git push -u origin master

原文地址:https://www.cnblogs.com/shaogang/p/7266099.html