github的使用
GIT是一个开源的分页式版本控制系统, Github 是GIT项目的托管网站,下面看看如何使用GIT管理我们的项目:
1. 安装git客户端
windows下安装tortoisegit,默认会安装mingw环境。也可以Cmder工具。
2. 生成密钥对
开始菜单打开Git Bash
ssh-keygen -C '[email protected]' cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDbAqRzxCOVa8O2/mGEDvqfjtONK1/a1uxGG82cmVtJ/o3GDPudymy6hlZ4oha02SrPU44jpc7wzvVPhruiDTgvQxGHt2DEm2ex7NdnvNQNjBciqhXt+zoiH/lvPDLBf/zdOwpyt3MFAS8myNgzD2iOOPczPDqbcf3dkDE/jiE2kmw1Mm9zQaNX5fCU/jYEL7vS9t2v6wGrSACmkoq6aH8wlPt9z8nlcFIhp7CScYJ24BiKYno/erFE0BMdhIjlN5P7kjVYyzWdW6ewPazf9Xw00kw5yTOYkJFjoZBbKZ98D2d53ddsL74YPvhDupEFP+Os0XEWN5wuooeazsRn [email protected]
3. 登录github,拷贝密钥
Settings ---> SSH and GPG keys ---> New SSH key
测试:
$ ssh -T [email protected] Hi youemail! You've successfully authenticated, but GitHub does not provide shell access.
4. 创建工程test
+ ---> New reposity ---> Create repository
5.上传本地test源码到github
mkdir ~/test cd ~/test git init git config --global user.name "your name" git config --global user.email "[email protected]" touch README git add README git commit -m 'first commit' git remote add origin [email protected]:youremail/test.git git push -u origin master -f git pull --rebase origin master
6. 删除仓库
进入test仓库后,点击右上角Settings ---> Delete this repository
Gitlab 与github 功能比较类似,但是gitlab 的私有仓库是免费的,值得一试。
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16