java day 1
1.git安装
- 安装没什么特殊的,只是在路径保存上没有选择默认路径。
2.git语句的使用
-
git config –global 参数,有了这个参数,表示你这台机器上所有的Git仓库都会使用这个配置,当然你也可以对某个仓库指定的不同的用户名和邮箱。
![NR]8K}ZW_60K_Y24_FVEV{T.png](https://img.haomeiwen.com/i2457754/bc87d9bc1fdbb057.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -
ssh-keygen -t rsa -C + 邮箱 生成ssh公钥
![~]O%WP7{TB_`7}UFQKRB@WV.png](https://img.haomeiwen.com/i2457754/4c520800f133a963.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -
创建版本库,如我是在E盘下的eclipse下创建。

4.从远程库中克隆的命令是git clone,可以从远程库中克隆到本地库中。

5.进入cxy下,git status查看仓库状态。

![0W7_4L7_VARYOR(}]@4WYX2.png](https://img.haomeiwen.com/i2457754/9fea8bd9715553f5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
6.git add.添加当前工作目录文件到index,并查看齐状态。


7.git commit –m “XX” 提交文件 –m 后面的是注释。
![FIT4%NBQ(L]@EA@98}7CJBN.png](https://img.haomeiwen.com/i2457754/2127796660aba059.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
8.git push –u(第一次要用-u 以后不需要) origin master 把当前master分支推送到远程库。

- 以上就是从创建到传输文件的步骤和方法。