使用github对自己的项目以及实验数据进行管理。
网上关于将本地项目上传于github上的文章不少,本人只是结合自己初次上传项目来谈谈感想和遇见的一些错误。对初次操作者有很大帮助!嘻嘻嘻!!
1.首先必须在github上面创建自己的账号,本文并未做详细操作。
2.上传项目,创建一个新的项目文件。

3.点击New repository新建个人项目。

看清楚上面红色标记,最后两个有无均可。并点击Create repository进入下一步。创建成功后如下图:

4,获取SSH和URL地址等:

5.接下来将本地项目上传,但是必须有git开源控制器,下载连接:https://git-scm.com/downloads。

各版本自行匹配。本人使用windows10
6.安装完成之后,会出现git-bash和git-cmd等.exe运行程序。

8.不要着急去点击git-bash按钮,而是找到你需要上传的文件(比如:E:\project),并右击鼠标会出现git-bash HERE和git-GUI HERE,然后点击git-bash,出现下图:

9。把github上面的仓库克隆到本地,即 git clone https://github.com/LLAYGDD/Project.git。此时此刻用到第四部里的ssh,如图:

点击回车可以得到下面:

将除Project之外的所有文件拷贝在Porject中。并使用cd 切换到Project中
10.依次输入以下代码即可完成其他剩余操作:
git add . (请不要忘记后面的 .,此操作是把Project文件夹中的所有文件都添加进来)
git commit -m "需要上传的文件项目" (注:“需要上传的文件项目”里面换成你需要,如“canhe或者opencv”)

git push -u origin master (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码,本文为默认,设置密码过于啰嗦)。

完成之后更新github即可看到你上传的代码!
谢谢!!
网友评论