github的简单使用

来源:互联网 发布:阿里通网络客服电话 编辑:程序博客网 时间:2024/04/30 13:07

1安装git后

$ git config --global user.name "Your Name"$ git config --global user.email "email@example.com"

2.生成本地的ssh密钥:

打开Shell(Windows下打开Git Bash)

$ ssh-keygen -t rsa -C "youremail@example.com"
2.将id_rsa.pub里的内容复制拷贝到:

github主页中的setting-->sshkeys and GPGkeys-->new ssh keys


3.下载文件:

选择所需下载的项目地址

clone and download-->git@github.com:wzcwmhp/upload.git

进入你所要下载的文件夹:

在本地文件夹:

git clone git@github.com:wzcwmhp/upload.git



2.上传文件:

需要保证本地有一个和服务器一样的仓库,

或者建立一个仓库,clone到本地,将需要上传的文件拷贝到本地的文件夹中,

git clone git@github.com:wzcwmhp/upload.git

输入一下命令:

git add -A

git commit -m 'hahahhha'

git push





2 0