Skip to content

Git Workflow for Team Members

Reinhard Budde edited this page Nov 25, 2020 · 2 revisions

Step-by-step guide

Command Description
git clone https://github.com/OpenRoberta/openroberta-lab.git get the repository for the first time
git checkout develop get the work of the other developers ...
git pull … from the remote repository
git branch myFeature create a feature branch ...
git checkout myFeature … and start working with it. code in eclipse, write tests.
git status list all files, that have been created, modified or deleted
git add add one or more files for a commit. Better: "add --all" to add all changes.
git commit -m "reasonable message" commit into your local feature branch. coding, adding, committing may happen many times. All changes are local.
! now everything is committed, the work is done, others should take advantage of your work
git checkout develop you need to know, what others have done since your branch. Thus: get their work ...
git pull … from the remote repository. No problem here.
git checkout myFeature you have to check, whether work of others conflicts with your work
git rebase develop this is the crucial part. Read the comment about rebasing below! We assume, that the rebase finished successfully. Run all unit tests. If errors pop up, you have to solve conflicts. If you are a beginner, get help!
git checkout develop ; git merge myFeature Hurry to checkout develop and merge your changes. If the rebase terminated with "fast forward", there should be no problem. The merge will terminate with "fast forward", too.
git push push it to the remote repository
git branch -d myFeature delete your feature branch, but you can continue to work with it. Don't care. Your work is saved in "develop".
Clone this wiki locally