...
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 |
...