Direct workflow: "pull-push"

This workflow is generally used when working on a new project

Steps to follow are :

To do only the first time

  • configure git
  • fork official project you want to work on
  • get development branch

For each new modification

  • commit your modifications
  • push it to official repository

Note

If you are a new git user, you can try git on try.github.io to be more familiar with git commands. You can also have a look to Atlassian Git documentation.

Configure git

"--global" refer to your username on your computer. So you need to config only once for you.

If you want a specific config for a specific project, please use "--local"

git config --global user.name "my name"
git config --global user.email myemail@foo.com
git config --global push.default simple
git config --global core.editor <your_favorite_editor>

Clone repository

git clone giturl
# with giturl something like git+ssh://username@scm.gforge.inria.fr//gitroot/project/repository.git
# for example: git+ssh://username@scm.gforge.inria.fr//gitroot/oalab/oalab-tissue.git

Your local repository is now ready to work on !

Work on your modifications

# edit file(s)
git commit
git add mynewfile.py
git commit
# edit file(s)
git commit

Commit message

Please write a good commit message:

Try to limit using the -m commit flag.

If using the simpler git commit command it should open up Vim (if it’s your default editor) where you can construct a better commit by following some of these simple steps.

  • The first line should be a short summary. Referencing the bug number or the main accomplishment of the change. e.g “Fixes issue #8976″. This is the title of your commit and should be less than 50 characters.
  • Then a line break.
  • Followed by a longer detailed description about the things that changed. This section is a really good place to explain what and why. You could cover statistics, performance wins, roadblocks, etc. The text should be wrapped at 72 characters.

Push your work

When your are satisfied with your work, push it to official repository.

git fetch
git rebase
git push

You can now start a new contribution cycle, see "Work on your modifications"

Table Of Contents

Previous topic

Contribute to documentation

Next topic

Enhance documentation

This Page