git贡献代码流程

1、本地创建ssh key:

$ ssh-keygen -t rsa -C "your_email@youremail.com"

2、回到github,进入Account Settings,左边选择SSH Keys,Add SSH Key,title随便填,粘贴key。为了验证是否成功,在git bash下输入:

$ ssh -T git@github.com

  如果是第一次的会提示是否continue,输入yes就会看到:You’ve successfully authenticated, but GitHub does not provide shell access 。这就表示已成功连上github。

3、设置username和email,因为github每次commit都会记录他们。

$ git config --global user.name "your name"
$ git config --global user.email "your_email@youremail.com"

4、

  1)、从git上获取项目

$ git clone (fork过来项目的ssh地址)

  2)、把本地仓库传到github

$ git remote add origin git@github.com:yourName/yourRepo.git

end!

原文地址:https://www.cnblogs.com/91allan/p/5260315.html