diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/git.html | 204 | ||||
-rw-r--r-- | dev/index.html | 15 |
2 files changed, 133 insertions, 86 deletions
diff --git a/dev/git.html b/dev/git.html index fdae528..3e5f4c1 100644 --- a/dev/git.html +++ b/dev/git.html @@ -6,7 +6,7 @@ </head> <body> - <a href="index.html">Dev Index</a> + <a href="index.html">Development Index</a> <h1>Git</h1> <p>First configure your global identity, configuration @@ -34,45 +34,48 @@ </li> </ul> - <h2 id="teamwork">Team WorkFlow</h2> + <pre> + $ git clone devbox:atom + $ git remote -v + </pre> + + <h2 id="teamwork">1. Team WorkFlow</h2> <p>This work flow is based on - <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a>, + <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a> development model, it defines rules how branches are forked, merged and tagged. By having well defined set of branches, the project structure is used as a communication tool, allowing to work simultaneously on different stages of the development.</p> - <pre> - $ git clone devbox:atom - $ git remote -v - </pre> - - - <h3>Main Branches;</h3> + <p>Main Branches;</p> <dl> <dt>master</dt> <dd>Current official stable release history.</dd> - <dt>release</dt> - <dd>Next release, new features not allowed.</dd> <dt>develop</dt> <dd>Integration branch for features.</dd> </dl> - <h3>Add-on Branches;</h3> + <p>Add-on Branches;</p> <dl> - <dt>feature</dt> + <dt>feature (f-)</dt> <dd>New features, improvement proposal, tests, etc...</dd> - <dt>hotfix</dt> - <dd>Hotfix is branched of master and should only contain isolated bugfixes.</dd> + <dd>Only fork and merge from/to develop. + <dt>release (r-)</dt> + <dd>Next release, new features not allowed.</dd> + <dd>Fork from develop, merges to master and develop.</dd> + <dt>hotfix (h-)</dt> + <dd>Hotfix only contain isolated bugfixes.</dd> + <dd>Only fork from master, merges back to master and develop.</dd> </dl> - <h2 id="feature">Feature</h2> + <p> + <h3 id="feature">1.1. Feature</h3> - <p>Create a branch and checkout;</p> + <p>Create a branch featurex from develop and checkout;</p> <pre> $ git checkout -b featurex develop @@ -84,52 +87,69 @@ $ git push -u origin featurex </pre> - <p>Rename a branch;</p> + <p>Rename a branch, if all feature branches start by "f-" is easy + and quick to type and easy to spot;</p> <pre> - $ git branch -m featurex feature-x + $ git branch -m featurex f-xpto </pre> <p>Rename remote branch;</p> <pre> - $ git push origin :featurex feature-x - $ git push origin -u feature-x + $ git push origin :featurex f-xpto + $ git push origin -u f-xpto </pre> <p>Merge branch feature into develop;</p> <pre> - $ git checkout develop - Switched to branch 'develop' - $ git merge --no-ff feature-x - Updating ea1b82a..05e9557 - (Summary of changes) - $ git push origin develop + $ git checkout develop + Switched to branch 'develop' + $ git merge --no-ff f-xpto + Updating ea1b82a..05e9557 + (Summary of changes) + $ git push origin develop </pre> <p>Delete Local;</p> <pre> - $ git branch -D feature-x + $ git branch -D f-xpto </pre> <p>Delete Remote</p> <pre> - $ git push origin :feature-x + $ git push origin :f-xpto </pre> - <h2 id="release">Release</h2> + <h3 id="release">1.2. Release</h3> + + <p>Software release numbers follow <a href="http://semver.org/">Tom Preston-Werner</a> + description;</p> <pre> - $ git checkout -b release-1.2 develop - Switched to a new branch "release-1.2" - $ ./bump-version.sh 1.2 - Files modified successfully, version bumped to 1.2. - $ git commit -a -m "Bumped version number to 1.2" - [release-1.2 74d9424] Bumped version number to 1.2 - 1 files changed, 1 insertions(+), 1 deletions(-) + software-name-X.Y.Z.tar.xz + </pre> + + <dl> + <dt>X</dt> + <dd>Major version, backwards incompatible API changes.</dd> + <dt>Y</dt> + <dd>Minor version, backwards-compatible changes.</dd> + <dt>Z</dt> + <dd>Patch version, backwards-compatible bug fixes.</dd> + </dl> + + <pre> + $ git checkout -b r-1.2.1 develop + Switched to a new branch "release-1.2.1" + $ ./bump-version.sh 1.2.1 + Files modified successfully, version bumped to 1.2.1. + $ git commit -a -m "Bumped version number to 1.2.1" + [release-1.2 74d9424] Bumped version number to 1.2.1 + 1 files changed, 1 insertions(+), 1 deletions(-) </pre> <p>Only documentation or bugfixes are allowed in this @@ -137,75 +157,99 @@ and push to master;</p> <pre> - $ git checkout master - Switched to branch 'master' - $ git merge --no-ff release-1.2 - Merge made by recursive. - (Summary of changes) - $ git tag -a 1.2 + $ git checkout master + Switched to branch 'master' + $ git merge --no-ff r-1.2.1 + Merge made by recursive. + </pre> + + <p>Tag new release with software-name-version, this + allows meaningful ports + <a href="../core/ports.html">distfiles</a> when + downloading releases from git archives;</p> + + <pre> + $ git tag -a software-name-1.2.1 + $ git push --follow-tags </pre> <p>Update branch develop with bugfixes from last release, conflict will happen in next step</p> <pre> - $ git checkout develop - Switched to branch 'develop' - $ git merge --no-ff release-1.2 - Merge made by recursive. - (Summary of changes) + $ git checkout develop + Switched to branch 'develop' + $ git merge --no-ff r-1.2.1 + Merge made by recursive. + (Summary of changes) + $ git push </pre> - <h2 id="hotfix">Hotfix</h2> + <h3 id="tags">1.3. Tags</h3> - <p>This branch should never exist, ;)</p> + <p>There are two main types of tags, lightweight and + annotated. Lightweight tag is a pointer to a specific commit, + much like cheap branches. Annotated tags are stored as full objects + and allow to sign with <a href="gnupg.html">gnupg</a>, making it ideal + for distributing releases.</p> + + <p>Delete local and remote last end of life version;</p> <pre> - $ git checkout -b hotfix-1.2.1 master - $ ./bump-version.sh 1.2.1 - Files modified successfully, version bumped to 1.2.1 - $ git commit -a -m "Bumped version number to 1.2" + $ git tag -d software-name-0.0.12 + $ git push origin :refs/tags/software-name-0.8 </pre> + <p>Checkout master commit you want to start long term support and then;</p> + <pre> - $ git commit -m "Commit severe fixes" + $ git tag -m "this commit is tagged" -a "software-name-1.1.8" + $ git push --follow-tags </pre> + <h3 id="hotfix">1.4. Hotfix</h3> + + <p>This branch should never exist, ;)</p> + <pre> - $ git checkout master - Switched to branch 'master' - $ git merge --no-ff release-1.2.1 - Merge made by recursive. - (Summary of changes) - $ git tag -a 1.2.1 + $ git checkout -b h-1.2.2 master + $ ./bump-version.sh 1.2.2 + Files modified successfully, version bumped to 1.2.2 + $ git commit -a -m "Bumped version number to 1.2.2" </pre> - <p>Conflict will happen in next step</p> - <pre> - $ git checkout develop - Switched to branch 'develop' - $ git merge --no-ff release-1.2.1 - Merge made by recursive. - (Summary of changes) + $ git merge --no-ff b-error-xpto + ... + $ git merge --no-ff b-error-xpto + ... + $ git commit -m "Commit severe fix" + ... + $ git commit -m "Commit severe fix" + ... </pre> <pre> - $ git -D hotfix-1.2.1 + $ git checkout master + Switched to branch 'master' + $ git merge --no-ff h-1.2.2 + Merge made by recursive. + (Summary of changes) + $ git tag -a software-name-1.2.2 </pre> - <h2 id="tags">Tags</h2> + <p>Conflict will happen in next step</p> <pre> - $ git tag -m "this commit is tagged" -a "v1.8" - $ git push --follow-tags + $ git checkout develop + Switched to branch 'develop' + $ git merge --no-ff h-1.2.2 + Merge made by recursive. + (Summary of changes) </pre> - <p>Delete local and remote tag;</p> - <pre> - $ git tag -d v1.8 - $ git push origin :refs/tags/v1.8 + $ git -D h-1.2.2 </pre> <h2 id="local">Local Workflow</h2> @@ -230,10 +274,10 @@ $ git checkout f000^ -- path/to/file </pre> - <a href="index.html">Dev Index</a> - <p>This is part of the SysDoc Manual. + <a href="index.html">Development Index</a> + <p>This is part of the c9-doc Manual. Copyright (C) 2016 - Silvino Silva. + c9 Team. See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p> diff --git a/dev/index.html b/dev/index.html index 20e2c22..cd314f9 100644 --- a/dev/index.html +++ b/dev/index.html @@ -16,12 +16,15 @@ <ul> <li><a href="git.html">Git</a> <ul> - <li><a href="git.html#teamwork">Team workflow</a></li> - <li><a href="git.html#feature">Feature</a></li> - <li><a href="git.html#release">Release</a></li> - <li><a href="git.html#hotfix">Hotfix</a></li> - <li><a href="git.html#tags">Tags</a></li> - <li><a href="git.html#local">Local</a></li> + <li><a href="git.html#teamwork">1. Team workflow</a> + <ul> + <li><a href="git.html#feature">1.1. Feature</a></li> + <li><a href="git.html#release">1.2. Release</a></li> + <li><a href="git.html#tags">1.3. Tags</a></li> + <li><a href="git.html#hotfix">1.4. Hotfix</a></li> + </ul> + </li> + <li><a href="git.html#local">2. Local Workflow</a></li> </ul> </li> </ul> |