1.下载GIT后,设置好用户名和邮箱。

2.创建文件夹,并将此文件夹设为版本库。

3.把代码文件添入版本库

4.创建github账号,并创建SSH密匙。

5.从文件夹中找出.ssh后缀的文件,并复制其中id_rsa里文件内容。登录github,打开” settings”中的SSH Keys页面,然后点击“Add SSH Key”,填上任意title,在Key文本框里粘贴id_rsa文件的内容,然后点击add key

6.在github上创建一个新的仓库,同时在本地仓库运行命令,把本地库内容推向远程。

7.刷新github界面,可以发现代码文件已经被推向至远程。


网友评论