-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Home
Branching model follows http://nvie.com/posts/a-successful-git-branching-model/:
-
master
branch is stable, HEAD is always the latest release -
develop
branch contains the latest code for the next release. - various feature branches, to be merged into
develop
upon completion
For a new feature, branch off develop
:
$ git checkout -b myfeature develop
To merge a feature back into develop
:
$ git checkout develop
$ git merge --no-ff myfeature
$ git branch -d myfeature
$ git push --tags origin develop
To start a new release, first branch off develop
:
$ export RELEASE=0.7.8
$ git checkout -b release-${RELEASE} develop
To finalize the release, merge its branch into master
and develop
, and tag master
:
$ git checkout master
$ git merge --no-ff release-${RELEASE}
$ git tag -a
And update PyPi & documentation: $ cd docs/src; make clean html $ python2.5 ./setup.py test $ python2.5 ./setup.py sdist bdist_egg register upload $ scp -r docs/src/_build/html/* [email protected]:/nlp/projekty/gensim/public_html/
There should be no trailing whitespace in source code. Whitespace on empty Python lines (lines separating blocks of code/methods etc.) is fine and even desirable, but more difficult to work around in git.
To make sure you didn't introduce any trailing whitespace in your commit, enable the pre-commit hook (=move file .git/hooks/pre-commit.sample
to .git/hooks/pre-commit
). In this file, there should be a line:
exec git diff-index --check --cached $against --
Change it to
exec git diff-index --check --cached $against src
Now every commit inside the src
directory will be first checked by this hook. If there is trailing whitespace, the hook will refuse the commit and give you the offending line(s), which you must fix first.