i'm in branch 'master' and pull it to up to date:
jh@rautu:/usr/src/orig/sip-router$ eg switch master Already on "master" Your branch is behind the tracked remote branch 'origin/master' by 283 commits, and can be fast-forwarded. jh@rautu:/usr/src/orig/sip-router$ eg pull remote: Counting objects: 176, done. remote: Compressing objects: 100% (108/108), done. remote: Total 109 (delta 70), reused 0 (delta 0) Receiving objects: 100% (109/109), 45.86 KiB, done. Resolving deltas: 100% (70/70), completed with 29 local objects.
From ssh://jh@git.sip-router.org/sip-router
ea1f8a2..77523f3 andrei/cdefs2doc -> origin/andrei/cdefs2doc e6eceeb..f572564 kamailio_3.0 -> origin/kamailio_3.0 73655cc..482db59 master -> origin/master b0853ed..0e1baf0 sr_3.0 -> origin/sr_3.0 * [new branch] tmp/pipelimit -> origin/tmp/pipelimit First, rewinding head to replay your work on top of it... Fast-forwarded master to 482db59aa2788737d9c6c0294a625bd3002d54c3.
i then switch to another branch, say 'kamailio_3.0', and it tells me:
jh@rautu:/usr/src/orig/sip-router$ eg switch kamailio_3.0 Switched to branch "kamailio_3.0" Your branch is behind the tracked remote branch 'origin/kamailio_3.0' by 1 commit, and can be fast-forwarded.
how can i do this 'fast-forwarding' without pulling again in this branch?
-- juha
On Jan 27, 2010 at 11:58, Juha Heinanen jh@tutpro.com wrote:
i'm in branch 'master' and pull it to up to date:
jh@rautu:/usr/src/orig/sip-router$ eg switch master Already on "master" Your branch is behind the tracked remote branch 'origin/master' by 283 commits, and can be fast-forwarded. jh@rautu:/usr/src/orig/sip-router$ eg pull remote: Counting objects: 176, done. remote: Compressing objects: 100% (108/108), done. remote: Total 109 (delta 70), reused 0 (delta 0) Receiving objects: 100% (109/109), 45.86 KiB, done. Resolving deltas: 100% (70/70), completed with 29 local objects.
From ssh://jh@git.sip-router.org/sip-router
ea1f8a2..77523f3 andrei/cdefs2doc -> origin/andrei/cdefs2doc e6eceeb..f572564 kamailio_3.0 -> origin/kamailio_3.0 73655cc..482db59 master -> origin/master b0853ed..0e1baf0 sr_3.0 -> origin/sr_3.0
- [new branch] tmp/pipelimit -> origin/tmp/pipelimit
First, rewinding head to replay your work on top of it... Fast-forwarded master to 482db59aa2788737d9c6c0294a625bd3002d54c3.
i then switch to another branch, say 'kamailio_3.0', and it tells me:
jh@rautu:/usr/src/orig/sip-router$ eg switch kamailio_3.0 Switched to branch "kamailio_3.0" Your branch is behind the tracked remote branch 'origin/kamailio_3.0' by 1 commit, and can be fast-forwarded.
how can i do this 'fast-forwarding' without pulling again in this branch?
With basic git: git checkout kamailio_3.0; git pull --rebase origin kamailio_3.0 (in this case if you get the fast forward message --rebase is not really needed, but OTOH it does nut hurt and it's safer to always use it).
I'm not familiar with eg, but maybe another pull will do it.
If you want a single command that will fast-forward all your local remote tracking branches, then AFAIK there isn't one but you could try writing a script (but be carefully to check first if a branch can be fast forwarded and doesn't require some manual conflict fixes or a rebase).
Andrei
Andrei Pelinescu-Onciul writes:
how can i do this 'fast-forwarding' without pulling again in this branch?
With basic git: git checkout kamailio_3.0; git pull --rebase origin kamailio_3.0 (in this case if you get the fast forward message --rebase is not really needed, but OTOH it does nut hurt and it's safer to always use it).
andrei,
the above again requires network access. i would imagine that since git knows that i have already done pull at some branch, i could somehow be able to fast forward the other branches without a need for a new pull at each branch.
-- juha
On Jan 27, 2010 at 22:00, Juha Heinanen jh@tutpro.com wrote:
Andrei Pelinescu-Onciul writes:
how can i do this 'fast-forwarding' without pulling again in this branch?
With basic git: git checkout kamailio_3.0; git pull --rebase origin kamailio_3.0 (in this case if you get the fast forward message --rebase is not really needed, but OTOH it does nut hurt and it's safer to always use it).
andrei,
the above again requires network access. i would imagine that since git knows that i have already done pull at some branch, i could somehow be able to fast forward the other branches without a need for a new pull at each branch.
git rebase origin/kamailio_3.0 # will also rebase possible local # commits or
git merge --ff origin/kamailio_3.0 # works only for fast forward # (there are no local commits)
If you want only to compile, you can also checkout directly origin/kamailio_3.0, e.g. git checkout origin/kamailio_3.0. You want be able to commit though (think of it as a kind of read-only access).
Andrei