From 2cda042c1c46b245a9e012a95ac2910525505a31 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Tue, 20 Sep 2016 16:36:15 +0100 Subject: index's revision --- dev/index.html | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 dev/index.html (limited to 'dev') diff --git a/dev/index.html b/dev/index.html new file mode 100644 index 0000000..20e2c22 --- /dev/null +++ b/dev/index.html @@ -0,0 +1,86 @@ + + + + + Development + + + + Documentation Index +

Development

+ +

Tools for development and debugging

+ +

Source Code Revision

+ + + +

C

+ + + +

Shell Script

+

Dash

+ + + + +

Bash

+ + + +

Python

+ + +

Perl

+ + +

JavaScript

+ + +

PHP

+ + + + + + Documentation Index +

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

+ + + + + -- cgit 1.4.1-2-gfad0 From e77894b32b609572f46e30d25372166016b500d4 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Tue, 20 Sep 2016 17:21:19 +0100 Subject: added dev git --- dev/git.html | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 dev/git.html (limited to 'dev') diff --git a/dev/git.html b/dev/git.html new file mode 100644 index 0000000..fdae528 --- /dev/null +++ b/dev/git.html @@ -0,0 +1,242 @@ + + + + + Git + + + + Dev Index +

Git

+ +

First configure your global identity, configuration + file resides on ~/.gitconfig ;

+ +
+       $ git config --global user.name "User Name"
+       $ git config --global user.email user@devbox
+    
+ +

Assumptions of this document;

+ +
    +
  • Correct + user account + exists on git server or is public readable. +
  • +
  • Repository exists or + create one + if you have permissions. This document uses atom as example. +
  • +
  • Correct + ssh identities, + and profile alias have been setup. This document uses devbox as example. +
  • +
+ +

Team WorkFlow

+ +

This work flow is based on + 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;

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

Add-on Branches;

+ +
+
feature
+
New features, improvement proposal, tests, etc...
+
hotfix
+
Hotfix is branched of master and should only contain isolated bugfixes.
+
+ +

Feature

+ +

Create a branch and checkout;

+ +
+    $ git checkout -b featurex develop
+    
+ +

Push new branch to server

+ +
+    $ git push -u origin featurex
+    
+ +

Rename a branch;

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

Rename remote branch;

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

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

Delete Local;

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

Delete Remote

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

Release

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

Only documentation or bugfixes are allowed in this + branch. When release is ready for production merge + 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
+    
+ +

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

Hotfix

+ +

This branch should never exist, ;)

+ +
+       $ 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 commit -m "Commit severe fixes"
+    
+ +
+       $ 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
+    
+ +

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 -D hotfix-1.2.1
+    
+ +

Tags

+ +
+    $ git tag -m "this commit is tagged" -a "v1.8"
+    $ git push --follow-tags
+    
+ +

Delete local and remote tag;

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

Local Workflow

+ +

Mark all deleted to commit;

+ +
+    $ git ls-files --deleted -z | xargs -0 git rm
+    
+ +

Last commit that affected current path

+ +
+    $ git rev-list -n 1 HEAD -- .
+    $ git show f000 path/to/file
+    $ git diff --name-status f000 path/to/file
+    
+ +

Undo a file to specific commit

+ +
+    $ git checkout f000^ -- path/to/file
+    
+ + Dev Index +

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

+ + + + -- cgit 1.4.1-2-gfad0