mac git 从GitHub下载工程 上传修改的文件

前提

1.电脑已经有git(在终端输入git可以查询到)

2.有GitHub账号

第一步:设置git的username和email(对应GitHub)

git config --global user.name  "fanqiusha"

git config --global user.email  "[email protected]"

第一步:在终端进入打算保存工程的文件夹

cd  /Users/jiazijie/Desktop/testgit/

第二步:创建ssh key

1.ssh-keygen -t rsa -C "[email protected]"

 2.回车,输入y,回车,当要求输入秘密时,直接回车,回车,不设置秘密

3.打开/Users/jiazijie/Desktop/.ssh目录下的id_rsa.pub文件获取key

cat /Users/jiazijie/Desktop/.ssh/id_rsa.pub

4.将复制到的新的key在github上更新ssh

5.验证链接

ssh -T git@github.com

第三步:在github创建一个项目,复制clone and download的地址https://github.com/fanqiusha/web.git

 

 

猜你喜欢

转载自www.cnblogs.com/fanqiusha1988/p/12409968.html