Git

From Code43 Urban Warefare Wiki wiki.code43.net

Jump to: navigation, search

This project uses the GIT repository at Sourceforge.

Our sourceforge page: https://sourceforge.net/projects/code43

Our GIT repository: http://code43.git.sourceforge.net/git/gitweb.cgi?p=code43/code43;a=summary


Contents

Branches

We use several different branches and each has a specific purpose.

  • master - Main branch and the default branch when cloning the GIT repository. Only released versions of code43 are present in this branch.
  • master bugfix - Bugfixes from previous released source code. Bugfix releases are done form this branch.
  • development - The main development branch, stable branch where features ready for release are stored and integration tested. This branch must always compile and start.
  • development bugfix - Bugfixes from integrated development features that still have not been released into master.
  • feature branch - Use the feature name as branch name. These are unstable branches based on the development branch or other feature branches. Because they are unstable there are no guarantees that the branch will work or even compile.

Name all branches with lowercase letters.

Getting the code

Download code as guest, readonly:
git pull git://code43.git.sourceforge.net/gitroot/code43/code43

Create a new local branch that tracks an remote branch:
git branch --track BRANCHNAME origin/BRANCHNAME

Switch to the new branch:
git checkout BRANCHNAME


Branch rules

  • One branch per feature should be followed as much as possible
  • Feature branches shall be based on either development or other feature branches
  • Master shall always be stable
  • Development shall always be compilable
  • Before merging a feature branch to development another programmer has to sign-off and perform a code review


GIT commands

See all branches:
git branch -a

Switch to a branch:
git checkout BRANCHNAME

Creating a remote branch from STARTBRANCH:
git push origin origin/STARTBRANCH:refs/heads/NEWBRANCH

custom essay writing services

Personal tools