From e1c3b905225706f3f485185b5a3b161a457a90d5 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 8 Oct 2016 13:14:04 +0100 Subject: dev git revision --- dev/git.html | 204 +++++++++++++++++++++++++++++++++++---------------------- dev/index.html | 15 +++-- 2 files changed, 133 insertions(+), 86 deletions(-) (limited to 'dev') 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 @@ - Dev Index + Development Index

Git

First configure your global identity, configuration @@ -34,45 +34,48 @@ -

Team WorkFlow

+
+       $ git clone devbox:atom
+       $ git remote -v
+    
+ +

1. Team WorkFlow

This work flow is based on - Vicent Driessen, + Vicent Driessen 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.

-
-       $ git clone devbox:atom
-       $ git remote -v
-    
- - -

Main Branches;

+

Main Branches;

master
Current official stable release history.
-
release
-
Next release, new features not allowed.
develop
Integration branch for features.
-

Add-on Branches;

+

Add-on Branches;

-
feature
+
feature (f-)
New features, improvement proposal, tests, etc...
-
hotfix
-
Hotfix is branched of master and should only contain isolated bugfixes.
+
Only fork and merge from/to develop. +
release (r-)
+
Next release, new features not allowed.
+
Fork from develop, merges to master and develop.
+
hotfix (h-)
+
Hotfix only contain isolated bugfixes.
+
Only fork from master, merges back to master and develop.
-

Feature

+

+

1.1. Feature

-

Create a branch and checkout;

+

Create a branch featurex from develop and checkout;

     $ git checkout -b featurex develop
@@ -84,52 +87,69 @@
     $ git push -u origin featurex
     
-

Rename a branch;

+

Rename a branch, if all feature branches start by "f-" is easy + and quick to type and easy to spot;

-        $ git branch -m featurex feature-x
+    $ git branch -m featurex f-xpto
     

Rename remote branch;

-        $ git push origin :featurex feature-x
-        $ git push origin -u feature-x
+    $ git push origin :featurex f-xpto
+    $ git push origin -u f-xpto
     

Merge branch feature into develop;

-       $ 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
     

Delete Local;

-       $ git branch -D feature-x
+    $ git branch -D f-xpto
     

Delete Remote

-       $ git push origin :feature-x
+    $ git push origin :f-xpto
     
-

Release

+

1.2. Release

+ +

Software release numbers follow Tom Preston-Werner + description;

-       $ 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
+    
+ +
+
X
+
Major version, backwards incompatible API changes.
+
Y
+
Minor version, backwards-compatible changes.
+
Z
+
Patch version, backwards-compatible bug fixes.
+
+ +
+    $ 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(-)
     

Only documentation or bugfixes are allowed in this @@ -137,75 +157,99 @@ and push to master;

-       $ 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.
+    
+ +

Tag new release with software-name-version, this + allows meaningful ports + distfiles when + downloading releases from git archives;

+ +
+    $ git tag -a software-name-1.2.1
+    $ git push --follow-tags
     

Update branch develop with bugfixes from last release, conflict will happen in next step

-       $ 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
     
-

Hotfix

+

1.3. Tags

-

This branch should never exist, ;)

+

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 gnupg, making it ideal + for distributing releases.

+ +

Delete local and remote last end of life version;

-       $ 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
     
+

Checkout master commit you want to start long term support and then;

+
-       $ git commit -m "Commit severe fixes"
+    $ git tag -m "this commit is tagged" -a "software-name-1.1.8"
+    $ git push --follow-tags
     
+

1.4. Hotfix

+ +

This branch should never exist, ;)

+
-       $ 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"
     
-

Conflict will happen in next step

-
-       $ 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"
+    ...
     
-       $ 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
     
-

Tags

+

Conflict will happen in next step

-    $ 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)
     
-

Delete local and remote tag;

-
-    $ git tag -d v1.8
-    $ git push origin :refs/tags/v1.8
+    $ git -D h-1.2.2
     

Local Workflow

@@ -230,10 +274,10 @@ $ git checkout f000^ -- path/to/file - Dev Index -

This is part of the SysDoc Manual. + Development Index +

This is part of the c9-doc Manual. Copyright (C) 2016 - Silvino Silva. + c9 Team. See the file Gnu Free Documentation License for copying conditions.

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 @@ -- cgit 1.4.1-2-gfad0