Git和Gitee的使用说明
参考文档和Git下载链接
Gitee帮助文档
Git中文使用手册
Git下载链接
注册 账号- Gitee.com
Git的常规使用
1、初始化git

git bash here
git config --global user.name "gitee在注册的时候输入的名字"
git config --global user.email "gitee绑定的邮箱"
生成ssh公匙,一路回车就可以了,如果输错邮箱的话,再重新执行该命令需要在第二个回车改成y,如图
ssh-keygen -t rsa -C "gitee绑定的邮箱"

cd ~/.ssh
cat id_rsa.pub
复制自己的公匙

然后在gitee的设置->安全设置里找到SSH公匙,按照说明执行,然后输入以下命令测试是否成功,第一次会要求输入yes
ssh -T git@gitee.com

2、克隆仓库到本地
示例:
git clone https://gitee.com/oschina/GitCodeTree.git
网上找到的项目复制git链接,然后使用git clone +仓库地址,如上 


下载完成 
克隆完成后该文件夹会多出你找的git项目

3、上传本地项目到Gitee
要先注册Gitee账号,先在gitee里新建仓库(在右上角的+号可以新建),然后复制它的git

在本地项目右键git bash here,一条执行完接下一条
git init
git remote add origin https://gitee.com/用户个性地址/HelloGitee.git
git pull origin master
git add .
git commit -m '可以任意输入,提交的备注,最好有意义'
git push origin master
执行完就本地项目就上传到gitee仓库了
如需再提交,执行后面的三个命令即可。
|