How to contribute to open source with idea

来源:互联网 发布:个人域名注册流程 编辑:程序博客网 时间:2024/05/05 00:26

when we are developing with idea,check out source code from GitHub or osChina,after hours later ,the open source author modified or add new features,we must keep sync in it,we can user “fetch” to duplicate remote/master to local repository and than “merge” ,before developing ,we new a developer branch called “dev”, and “dev” keep sync with local master,master keep with remote/master,if dev branch modified ,add files and commit them,then merge with local master,the last master keep merge with remote/master,at the end ,push you code to github or osChina;
在使用git开发的时候,假如开源作者的github上实现了某功能的更新,那本地idea 上 先将github上的更新fetch 到本地
然后在本地master 分支 进行merge,这样就实现远程仓库的同步,使得代码和远程仓库保持一致
测试3:
我将在这里解决冲突,假如远程仓库的修改了文件内容,同时本地也修改了同一文件,那将会发生冲突,测试解决冲突

测试2:
假如远程仓库的修改了文件内容,同时本地也修改了同一文件,那将会发生冲突,测试解决冲突

在这里把你本地的修改先add,然后commit files,最后 push 到远程即可贡献你的开源代码

假如你远程仓库修改了文件,
当你在本地开发的时候切了dev分支时,先保持本地master 和 远程同步,先从dev 分支i切换到master 分支,然后由master分支和远程分支合并

0 0