[ << Working with source code ] | [Top][Contents][Index][ ? ] | [ Compiling >> ] | ||
[ < Commit access ] | [ Up : Advanced Git procedures ] | [ Git on Windows > ] |
3.4.10 Pushing to staging
Do not push directly to the git master
branch. Instead,
push to staging
.
You will not see your patch on origin/master
until some
automatic tests have been run. These tests are run every couple
of hours; please wait at least 12 hours before wondering if your
patch has been lost. Note that you can check the commits on
origin/staging
by looking at the git web interface on
savannah.
It may happen occasionally that the staging branch breaks automated testing. In this case the automatic move of staging material to master gets halted in order to avoid broken material entering master. This is a safety net. Please do not try breaking out from it by adding fixes on top of staging: in that case the whole sequence will end up in master after all, defeating the purpose of the system. The proper fix usually involves rewriting the staging branch and is best left to core developers after discussion on the developer list.
Before pushing to staging it is a good practice to check whether staging is ahead of master, and if so, wait until master has caught up with staging before pushing. This simplifies things if changes to staging have to be backed out for some reason. To check whether master has caught up with staging you can look at the git web interface on savannah, or do:
git fetch gitk
and check that origin/master
is at the same commit as
origin/staging
. Another option is to see if any commits are
listed when you do:
git fetch git log origin/master..origin/staging
If your work is in a patch file
Assuming that your patch is in a file called ‘0001-my-patch.patch’ (see Patches), and you are currently on git master, do:
git checkout staging git pull -r git am 0001-my-patch.patch gitk git push origin staging git checkout master
Note: Do not skip the gitk
step; a quick 5-second
check of the visual history can save a great deal of frustration
later on. You should only see that staging
is only 1
commit ahead of origin/staging
.
If your work is in a branch
If you are working on branches and your work is in
my_branch_name
, then do:
git checkout my_branch_name git pull -r origin staging
This will rebase your branch on origin/staging
. At this point
git will let you know if there are any conflicts. If so, resolve them
before continuing:
gitk git push origin HEAD:staging
Note: Do not skip the gitk
step; a quick 5-second
check of the visual history can save a great deal of frustration
later on. You should see that my_branch_name
is only ahead of
origin/staging
by the commits from your branch.
[ << Working with source code ] | [Top][Contents][Index][ ? ] | [ Compiling >> ] | ||
[ < Commit access ] | [ Up : Advanced Git procedures ] | [ Git on Windows > ] |