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.
This is to make things easier for the person who broke the build - if they have to revert, having other checkins will make things harder to fix.
This will cause problems for you, if you want to check in - this is understood. If you really need to check in, find the person fixing the build and help them (pair program with them, etc.). Ideally, the person fixing the build would already have all the help they need. Fixing the build is high priority.
If you are a core committer, and the build is broken, drop what you are doing and find the person that is fixing the build and help them. If you don't find anyone fixing the build - either recruit people to do so, or do it yourself. The best and most direct way to do this is to just revert changes until the build passes.
Why is this important? It's because no forward progress can be made without a passing build. Without a working build, we do not have working software, and no-one can verify their software works.
Hudson has a job which automatically builds any branches starting with hudsonBuild. Use this to test experimental or WIP (work-in-progress) code.
Here's an example. Assume the current working directory is the top-level of a clone of our "head" repository, currently checked out to a branch called "master" which tracks "origin/master":
# 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 |