A fresh repository for testing the rebase workflow
-
Fork to create a public repo in your own Github account. I'll use my account (greenTara) for the examples. You should replace "greenTara" with your Github user name.
-
Clone your fork to your local computer.1
$ git clone https://githubcom/greenTara/Test-Rebase.git
-
Add the central (RuleML) repository as a read-only remote.2
$ git remote add ruleml git://github.com/RuleML/Test-Rebase.git
-
Switch the your master branch, if necessary.
$ git checkout master
-
Update your master branch from the ruleml remote.2
$ git pull ruleml master
There should be no conflicts from this pull, because you have been following the workflow described here and doing all your development in temporary branches.
-
Select an issue from the issue tracker to work on, or create a new issue.
-
Create and switch to a new branch in your local repo, with name, say, Issue#45.3
$ git checkout -b Issue#45
-
Make your changes in your usual working environment (eclipse, oXygen, ...), commit frequently, using messages that are helpful to you,4
$ git commit -a
test, repeat, ..., but do NOT push to your public fork. If you add or delete files or folders, use
$ git add -A
before you commit. End with a commit.
-
When your fix is finished (or far enough along that you want some review), update your repository from the ruleml repo online.2
$ git fetch ruleml
-
Use rebase to reorder your commits to occur on top of everybody else's. The -i option allows you to interactively clean up your commits.5
$ git rebase -i ruleml/master
-
Push your commits to a new branch in your remote fork.2
$ git push origin Issue#45
-
Login to your Github account to verify that everything got uploaded OK, then submit a pull request to RuleML/Test-Rebase from your Github account. If the RuleML repo already has a branch for Issue#45, submit your pull-request to that branch, otherwise submit to master.
-
The RuleML maintainer and/or other developers will make comments on your pull-request if anything needs to be changed. You can push new commits to your Issue#45 branch and they will automatically be added to the pull-request. If your submission is accepted, the RuleML/Issue#45 branch will be merged with RuleML/master. It will then be propagated to all forks when Step #2 or Step #6 are executed.