-
Notifications
You must be signed in to change notification settings - Fork 24
Git development workflow
The main-branch always represents the latest release. All development actions happen in the "development"-branch. The workflow for contributions is following:
- Fork the logdata-anomaly-miner repository
- Clone the forked repository to your development machine
- Create a feature branch
- Develop your feature and improvements in the feature-branch
- Fetch and merge from the upstream
- Push the changes to your github-repository
- Submit your pull-request
- Update your local development branch
- Update your development branch in your github-repository
Go to https://github.com/ait-aecid/logdata-anomaly-miner/ and click on fork.
After forking the repository into your own workspace, clone the development branch of that repository.
git clone -b development git@github.com:YOURUSERNAME/logdata-anomaly-miner.git
Alternatively you could create a development envrironment as described here..
Every single workpackage should be developed in it's own feature-branch. Use a name that describes the feature:
git checkout -b feature-jsonimporter
Please make sure that you commit only improvements that are related to the workpage you created the feature-branch for.
If your work on this feature-branch is done, make sure that you are in sync with the development-branch of the upstream:
git remote add upstream git@github.com:ait-aecid/logdata-anomaly-miner.git
git fetch upstream development
git rebase upstream/development
If any conflicts occur, fix them and add them using "git add " and continue with the rebase with "git rebase continue"
Additional infos:
- https://www.atlassian.com/git/tutorials/merging-vs-rebasing
- https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing
Before we can push our changes, we have to make sure that we don't have unnecessary commits. First checkout our commits:
git log
After that we can squash the last n commits together:
git rebase -i HEAD~n
Finally you can push the changes to YOUR github-repository:
git push
Additional documentation:
Use the GitHub-Webinterface to create a pull-request. Make sure that the target-repository is ait-aecid/development.
If your pull-request was accepted and merged into the development branch got to "8. Update your local development branch". If it wasn't accepted, read the comments and fix the problems. Before pushing the changes make sure that you squashed them with your last commit:
git rebase -i HEAD~2
Delte your local feature-branch after the pull-request was merged into the development branch.
Update your local development branch:
git fetch upstream development
git checkout -b development
git rebase upstream/development
Additional infos:
- https://www.atlassian.com/git/tutorials/merging-vs-rebasing
- https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing
- Update your development branch in your github-repository
Please make sure that you did "8. Update your local development branch" as described above. After that push the changes to your github-repository to keep it up2date:
git push