分两种情况:
- 代码仓库管理者给你添加该仓库的写入权限,这样的话可以直接push
- 如果不能直接push(大多数情况),采用经典的fork & pull request来提交代码,下面讲述这种情况
例如有个仓库https://github.com/ecomfe/esui.git
,其采用了经典的分支开发模型,稳定后的代码提交到master分支,其余特性则在dev分支上进行开发,待成熟后合并回master分支。
// Sample file using the Google C++ coding standard. | |
// | |
// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml | |
// | |
// General rules: | |
// - Indents are two spaces. No tabs should be used anywhere. | |
// - Each line must be at most 80 characters long. | |
// - Comments can be // or /* but // is most commonly used. | |
// - File names should be lower_case.c or lower-case.c | |
// |
NOTE: This is a working copy. This tutorial is unfinished and may contain inaccuracies.
I've written the title of this tutorial in Chinese, as I suspect that its contents may, at first glance, appear similarly incomprehensible to the audience.
However, just as I can sketch for you the following...
可執行文件 = (可 = can) + (執行 = execute) + (文件 = file) = executable (file)
C++ code style written in markdown.
Astyle code automatic formatting settings
You can use clang-format too.
Use tools like vera++