github fork的基础使用
### 前言
之前公司用的是svn,后来自己使用了码云(因为码云是免费的并且有私有空间)。后续为了项目发展,移步到github进行开源学习。
### fork
进入github点击fork到自己空间下。

### idea检出
进入fork后的项目页面,copy clone url。

打开idea,在菜单栏找到 VCS – Checkout From Version Control – Git

输入我们刚刚复制的地址,点击clone。完成后按提示会自动创建一个新项目。
### 提交代码
选中项目右键 – Git – Commit Driecroty
选中我们需要提交的文件,在Commit Message中输入本次提交的说明,点击Commit提交到本地仓库。

此时github上面还没有我们提交的代码,接下来再次提交到github。
选中项目右键 – Git – Repository – Push
点击Push推送到远程仓库。

此时在github上面就可以看到我们刚刚提交的代码了

### 拉取原项目代码
发现原项目中有代码更新了,我们想同步到我们自己的分支里面来,这时候需要拉取原项目的代码啦。
1. 打开自己的仓库,进入code下面。
2. 点击new pull request创建。

3. 选择base fork
4. 选择head fork
5. 点击Create pull request,并填写创建信息。


6\. 点击Merge pull request 合并从源fork来的代码。

7\. 完成。
[原文地址](https://www.vseu.com/articles/2018/09/18/1537198273791.html) [github](https://github.com/luckygrass)
参考:[拉取代码](https://blog.csdn.net/qq1332479771/article/details/56087333)