Skip to content

How to use GIT to collaborate with the code

Arthur Benemann edited this page Jun 7, 2013 · 1 revision

This is a copy and paste of a talk I had with other developer that I thought others would benefit. It's better if you go trought this guide first.

Let me show you how you can add a modification to the main program, ussing git/github to do the hard work of doing the version/merge stuff:

Using GIT

The best way to send me the files is thought git, that way you will be on the program history. Using git you should do this:

  • Fork the project on the github website
  • Clone your github repository to your pc
  • Create a new branch from master, to add your modifications related to the hud improvement
  • Commit your modifications to your local repository
  • Push your new branch (that will send all the commit's with it) to your repository on github
  • Do a pull request on github for me to add the modifications the the master branch Now comes my part:
  • Review your modifications to check if they still work on my device (I think a S3 and a cheap tablet cover most of the android spectrum)
  • Merge the branch into the master branch
  • Recheck the code...
  • Prepare a new release and fast-forward the stable branch (this one always point to the last Google play release)
  • Create a new app release and upload it to Google Play so everyone can enjoy the update. This are the basic git commands

You can do all this using the command line, or thought a gui. Personaly I like Git Gui, which is a avaliable for Win and Linux (don't know about mac), you can download it here: http://git-scm.com/downloads

Using Github

You can also do it on the github webpage if you changed just a couple of files. Go to this page: https://github.com/arthurbenemann/droidplanner/blob/issue_87_HUD_layout/DroidPlanner/src/com/droidplanner/widgets/HUD/HUDwidget.java Select edit copy and paste your own implementation, i should receive automatically a pull request when you are done.

If you are a programmer, or want to adventure in this world (you probably are looking at your results), you should really consider investing some time into GIT.