Skip to content

More on worflow, forks, rebasing

Lars Helge Øverland edited this page Dec 16, 2016 · 1 revision

First off, it is assumed the user is familiar with the use of Git. Please refer to the Pro Git Book for details on usage of the various commands.

First, it is suggested that you fork a copy of this repo into your own repo. You can do this by pressing the "Fork" button in the upper right hand corner of this page. You should end up with a forked repo like https://github.com/your-user-name/dhis2-core.

Now clone this repo into your machine with

git clone [email protected]:your-user-name/dhis2-core.git

Next, you will want to add a reference to the upstream master, so that changes can be pulled from there

git remote add upstream [email protected]:dhis2/dhis2-core.git

When you start working on a particular feature, you can create a new topic branch for this with git checkout -b myfeature

Perform all of your work for that feature there. When you are ready to commit, you can check the status of which files have changed with git status

Then, add these files with

git add myfile.java

When you are ready to commit, execute

git commit -m "Adding support for X" -m "This is a really cool feature which I like a lot and many people have been asking for"

With git you should include a short message and a longer description of your commit.

Once you are done, you can push this to your feature branch. .

git push origin myfeature

If you are satisfied, you can issue a pull request to merge this with the mainline branch.

Visit this page and press "New pull request" and then "Compare across forks". Choose the appropriate base and head fork. In this case, it might be

MORE LATER

Clone this wiki locally