Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Go Ahead, Break My Day

In Mifos source control head/master (the "master" branch of the "head" repository) is the "bleeding edge" of development. Ideally, this branch will always be stable But accidents happen, so here's what to do when you break the build.

  • be stoked, don't panic!
  • as soon as you notice you've broken the build, please try to fix the build immediately
  • if you can't fix it within a couple of hours, revert head/master to the last stable revision
  • if you aren't able to fix it, can't/didn't revert, and need to log off at the end of the day, let other developers know on IRC and send an email to the mifos-developer mailing list detailing
    • why the build (might) be broken
    • what (might) need to happen to fix it
  • never check in code onto a broken build (unless you are working to fix the broken build)
  • if you notice that someone else may have broken the build
    • reach out to them, ask them what's up on IRC and the mailing list
    • offer to help fix the build, and let folks know you're doing so on IRC and/or the developer mailing list
    • never check in code onto a broken build (unless you are working to fix the broken build)
    • work against a known good revision
  • don't "commit and split", try to integrate your work early in the day
  • merge your code into a branch starting with the name "hudsonBuild", like "hudsonBuildTryNewDatabaseSettings", and push the branch to sf.net. Hudson will automatically build any branch in head named thusly. When done, delete the branch.

...

No Format
# Create new WIP branch off master:
git checkout -b hudsonBuild-someWIP --track origin/master

# Make experimental changes, commit them.

# Push upstream:
git push origin hudsonBuild-someWIP

# Hudson sees the branch appear and automatically builds the code.

# If others have meanwhile done other work on master, you'll first have to:
git checkout hudsonBuild-someWIP
git pull --rebase

# If you like the changes and want them on master, do EITHER this:
git checkout master
git merge --ff-only hudsonBuild-someWIP

# OR, alternatively, get your WIP into master as follows (this usually works better, with less stupid merge conflicts) :
rm *patch
git checkout hudsonBuild-someWIP
git format-patch origin/master
git checkout master
git am --ignore-space-change --3way --ignore-date *.patch

# Now push your work to master!
git push origin master

# Whether you keep the changes or not, prune the branch from the remote server (note the colon):
git push origin :hudsonBuild-someWIP

# Switch back to master and delete the WIP branch:
git checkout master
git branch -d hudsonBuild-someWIP

# Or if for whatever reason you like to keep WIP branch around locally for a moment, then instead:
git checkout master
git branch -m hudsonBuild-someWIP _DONE_hudsonBuild-someWIP

See Also