新建一个git 地址后上传或第一次拉取

1. git init   (创建一个仓库)

2. git remote add origin http://192.168****************/pc.git             

3. git add -A

4. git commit -m 建立项目

5. git push -u origin master

拉取远程代码

1. git clone git http://192.168************/pc.git

2. cd **

3. git add -A

4. git commit -m 提交信息

5. git push -u origin master
 

git clone项目有2中模式:

1.https模式,账号密码匹配成功后,即可下载。

2.ssh模式,需要 创建本地的SSH Key ,然后将生成的 SSH Key 的公钥(id_rsa.pub)上传到git中,配置好公钥后,就能下载了

猜你喜欢

转载自blog.csdn.net/p930318/article/details/84982267