Eclipse Winery GitHub Workflow¶
This presents the tool chain used for creating and updating a pull request on GitHub.
For the general setup, please go to Eclipse Winery Toolchain.
Steps for working on a topic¶
Main idea: Separate branch for each topic (fix a bug, add functionality) and accordingly named. See https://guides.github.com/introduction/flow/index.html for more information.
Sync with latest changes on upstream (especially main branch):
git fetch upstream --prune.Create branch based on
upstream/mainand make it known publicly:git checkout upstream/maingit checkout -b [name]
Branch naming patterns:Bugfix:
fix/SHORT-TITLE, e.g.,fix/deletion-of-namespacesFeature:
feature/SHORT-TITLE, e.g.,feature/drag-and-drop-for-bpmn4toscaThesis:
thesis/SHORT-THESIS-TITLE. ReplaceSHORT-THESIS-TITLEwith something meaningful, e.g.,thesis/versioningEnPro: prefix
fixorfeature(see above) withenpro/, e.g.,enpro/fix/policy-renderingStuPro: prefix
fixorfeature(see below) withstupro/, e.g.,stupro/feature/github-oauth
git push --set-upstream origin [name]
Do you your fist commit. Don’t forget to sign-off the commit (Ctrl+S in Git Gui).
Push the changes to origin:
git push.Create [WIP] Pull Request.
Go to https://github.com/opentosca/winery 🡒 Pull Request
Change the “base branch” to OpenTOSCA/winery

Fill in the title of the Pull Request following the pattern
[WIP] Title of the thesis/work/targetFill in the provided description form
Add
[x]to the items listed in the write fieldCheck the description in the Preview and send the Pull Request
There are automatic checks in place

If there is a red cross, click in respective “Details” and fix them
You keep working and discuss with your supervisor how things go.
After each working day, do the following:
Commit. Don’t forget to sign the commit (Ctrl+S in Git Gui).
git pushKeep your branch updated with
upstream/main:git fetch upstreamgit merge upstream/mainResolve conflicts - if there are some. See https://www.jetbrains.com/help/idea/resolving-conflicts.html for a documentation when using IntellIJ.
git push
GitHub - Prepare Final Pull Request¶
The aim of these steps to have a single commit. This is required by the Eclipse process for checking for intellectual property (IP process for short).
Before commencing these steps, check with your supervisor
Formal Requirements¶
http://wiki.eclipse.org/Development_Resources/Contributing_via_Git 🡒 Create an account WITH THE SAME EMAIL AS USED FOR THE COMMITS (can also be checked in gitk)
Sign the Contributor Agreement electronically
Git Steps: Ensure that a single commit is created¶
git fetch upstream- fetches all updates from https://github.com/eclipse/winery (”upstream”) to the local git storagegit merge upstream/main- merges all updates from upstream to the local branch(Resolve merge conflicts) - required if there are conflicting changes
Commit & Push with signed commit message (Ctrl+S in Git Gui) - this ensures that you have the changes backuped in case something goes wrong at the next steps
git reset upstream/main- this prepares that all commits can be squashed together: The local checkout (”working tree”) is left untouched, but the “pointer” of the current branch is reset toupstream/main. Now, Git Gui shows the difference betweenupstream/mainand your changes.Check changes in Git Gui:
Each change you wanted: Is it recognized?
At each file: Is the copyright information in the header OK?
Check if you are listed in the NOTICE file as a contributor with the correct year
Are there too much changed lines? 🡒 Do not stage spurious lines to the commit (e.g., tab to spaces, …)
Are there too much changed files? 🡒 Do not stage files you did not intend to change (e.g.,
build.gradleif you did not touchbuild.gradleat all)Check again the style (!)
(Don’t forget RESCAN to see the current changes)
Add description as new markdown file to to
docs/index.md(if helpful)Press “Stage to Commit” 🡒 all changes are staged to Commit
Sign the Commit Message (Ctrl+S in Git Gui)
In the case of multiple authors: Add each additional author with
Co-authored-by. See also in the Eclipse Handbook.
Example:Co-authored-by: Some Bodyelse <somebodyelse@nowhere.com> Signed-off-by: Some Body <somebody@somewhere.com>
Commit & Push with “force overwrite” since you changed the branch:
git push -f
GitHub - Create Final Pull Request¶
Attention: Commits on the same branch done after the Pull Request is sent are still part of the Pull Request (!)
Go to https://github.com/eclipse/winery 🡒 Pull Request
Fill in the title of the Pull Request and give a more detailed description of the changes or added functionality
In case of UI changes: Add screenshots
Add
[x]to the items listed in the write fieldCheck the description in the Preview and send the Pull Request
Close your Pull Request at OpenTOSCA/winery with a comment referencing the full URL of the new Pull Request, e.g.
Follow up at https://github.com/eclipse/winery/pull/212.
GitHub - Change Final Pull Request¶
There are automatic checks in place

If there is a red cross, click in respective “Details” and fix them
In case of missing code quality, … changes are requested by a committer (person controlling the pull request process)
FOR WINERY THE FOLLOWING APPLIES:
Open Git Gui
Make requested changes in your code (don’t forget to RESCAN)
Commit
Push
Wait for a second review
In case everything is fine, squash the commits into one. See GitHub - Prepare Pull Request. Then, do a force push (
git push -f).
GitHub - After Pull Request Got Merged¶
Delete the branch locally.
The branch on origin (https://github.com/OpenTOSCA/winery) is deleted by the maintainer having done the merge.
Excursus: Git¶

Please see also use gitk to understand git to understand the settings in git.