分两种情况:
- 代码仓库管理者给你添加该仓库的写入权限,这样的话可以直接push
- 如果不能直接push(大多数情况),采用经典的fork & pull request来提交代码,下面讲述这种情况
例如有个仓库https://github.com/ecomfe/esui.git,其采用了经典的分支开发模型,稳定后的代码提交到master分支,其余特性则在dev分支上进行开发,待成熟后合并回master分支。
| --- src/http/ngx_http_variables.c.orig 2010-01-11 03:21:46.000000000 -0800 | |
| +++ src/http/ngx_http_variables.c 2010-02-18 10:01:32.000000000 -0800 | |
| @@ -93,6 +93,9 @@ | |
| static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r, | |
| ngx_http_variable_value_t *v, uintptr_t data); | |
| +static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r, | |
| + ngx_http_variable_value_t *v, uintptr_t data); | |
| + | |
| /* |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Example of `object pool' design pattern | |
| # Copyright (C) 2011 Radek Pazdera | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. |
| { | |
| "IAB1": "Arts & Entertainment", | |
| "IAB1-1": "Books & Literature", | |
| "IAB1-2": "Celebrity Fan/Gossip", | |
| "IAB1-3": "Fine Art", | |
| "IAB1-4": "Humor", | |
| "IAB1-5": "Movies", | |
| "IAB1-6": "Music", | |
| "IAB1-7": "Television", | |
| "IAB2": "Automotive", |
| A warning occurred (42 apples) | |
| An error occurred |