summary:
(I'm quite new to git;)
trying to to work like described here: http://nvie.com/posts/a-successful-git-branching-model/
however I seems to miss to understand how to work with several branches (i.e. master, develop, hotfix)
- shall I use "stash" when checking out a 3rd branch (hotfix from master, whilst in develop)
- do I miss sth. when using "push"
In Detail:
I've created with gitolite a repos:
- called "BE" which is from origin master
(1st use: git push origin master) - added some files and pushed them
( git add.; git commit -m "bla"; git push ) - then a branch origin develop
( git checkout -b develop master ) - added some files and pushed them
( ...; git push origin develop ) - now I'd like to create a brunch from "master" called hotfix_3.0.1
( git checkout -b hotfix-3.0.1 master )
=> And I get a problem:
error: Your local changes to the following files would be overwritten by checkout:
....
Please, commit your changes or stash them before you can switch branches.
Aborting
====
the question is:
how to establish working simultaneously with two branches?
shall I stash my changes in "develop" - brunch before checking out a new branch from master?