本文转载于:猿2048网站▶git bash上传代码到github
今天,老爷机notebook开始卡了,我决定格盘重装系统。
顺便复习一下git本地命令的使用
1,配置

2先跳过一般的操作。介绍链接github远程库的操作

我的两个钥匙在C:\Users\bond\.ssh文件夹下,打开id_rsa.pub复制里面所有内容,上github的ssh钥匙设置页面add key就可以了。



两点是要了解的:第一点,github需要ssh key 来辨别提交的内容是不是你本人的操作。
第二点:github允许你添加多个Key。假定你有若干电脑,你一会儿在公司提交,一会儿在家里提交,只要把每台电脑的Key都添加到GitHub,就可以在每台电脑上往GitHub推送了。
3.从远程库克隆/上传到远程库

克隆比较简单一行代码就ok
$ git clone git@github.com:hewasdrunk/test3.git
而更新上传代码就稍微多了些基本操作。我就直接拿我前段时间弄得jpg了。

还有其他一些命令:如下
git log 查看每个修改的版本内容
git status 查看问价你是否提交
git diff test1.html 查看修改的内容
总体上git只要知道和使用我列出来的信息,已经合格了。
来源:oschina
链接:https://my.oschina.net/u/4191619/blog/3103370