-
Notifications
You must be signed in to change notification settings - Fork 39
Git Workflow
RVS Git workflow has these basic phases:
- Creating your feature branch
- Pull request process
- Merging and closure
Please follow this procedure:
1. Make sure you are starting off the latest develop code:
git checkout develop
git pull
2. Create your feature branch. The branch should be named issxxx where xxx stands for issue number #xxx against which you are entering your changes. If there is no issue on the list, please enter one and assign it to yourself.
git branch issxxx
git checkout issxxx
NEVER branch off from master
branch as this will affect tagging and version numbering. Also, please note that master
branch is updated once a week and is considerably lagging behind develop
branch.
3. Make sure you updated the make script and that solution acutally builds:
cd $RVS
cmake . -B../build
cd ../build
make
4. Go back to your working folder and start working on your new feature.
1. Stage and commit your work:
git add ...
git commit -m"#xxx - my new feature"
2. Get latest changes sine you branched-off your feature branch:
-
ALWAYS merge latest
origin/develop
changes before pushing your feature branch -
NEVER merge from
master
branch as this will affect tagging and version numbering
Proceed like this:
git fetch --all
git merge origin/develop
3. Resolve any merge conflicts. If you noticed and new tags or any changes to CMakeLists.txt files (or anything that might affect make scripts in general), you must re-create make scripts:
cd $RVS
cmake . -B../build
Stage and comit your post-merge changes:
git add ...
git commit -m"#xxx - my new feature - after merge"
4. Push your feature branch onto origin:
git push --set-upstream origin iss_xxx_
1. Go the the RVS GitHub site and click "Code" -> "Branches".
2. Click "New pull request" button next to your issxxx branch
3. IMPORTANT adjust "base" and "compare" fields so that it reads:
base: develop - compare: issxxx
1. Enter short description of the changes (e.g., "Changes as per issue #xxx)
2. Enter info on how to test (e.g., bin/rvs -d 3 -c conf/test_xxx.conf
)
3. Assign label (enough is only module you are working on)
4. Request review from your peer
Wait for your peer to perform the review. If changes are requested proceed with 3.4 Submitting Fixes
If pull request is approved proceed with 4 Merging and Closure
You may directly edit, stage, commit and push your changes onto existing origin feature branch. Please do not create new branch of pull request.
If your request is approved:
1. Click purple "Merge" button. Your changes will be merged into develop
. Your pull request will be automatically closed.
2. Click "Delete branch" button to remove your feature branch from GitHub
3. Go to your working folder and synchronize your local develop
branch:
git checkout develop
git pull
Observe that your changes have propagated to your local develop
branch.
4. Delete your local feature branch as this is no longer needed:
git branch -d issxxx