-
Notifications
You must be signed in to change notification settings - Fork 0
GitAndGitFlow
For AlCap we are going to follow the git flow branching model. A couple of useful links to read are the explanation here and a cheat sheet here but this page will outline the main steps and also a couple of important additions we've learned.
Once you have initially cloned the AlcapDAQ repository, git flow needs to be set up separately.
First, check that you have git flow installed on your machine:
> which git-flow
If nothing appears, then you need to install it. (For Ubuntu, I think it was a simple sudo apt-get
command but you should look it up)
If you do have git flow installed, do the following:
> cd AlcapDAQ
> git flow init -d
(The -d
option tells git flow to use the default prefixes for the different branch types).
When you want to add a new feature, type the following commands:
> git flow feature start [feature_name]
where feature_name is a descriptive name for your feature.
This will automatically create a branch of develop and move you over to the new branch. To check you can type the command git branch
which will list all the branches you have locally, with the branch you are currently on denoted by an asterisk.
(Some other useful options to git branch
are -a
to print both local and remote branches and -v
, -vv
or -vvv
to get a more verbose output with things like the last commit message on each branch and which remote branch each local branch is tracking)