important : Git branch switch

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

important : Git branch switch

Edward Hervey
Administrator
Hello everyone,

  Wim has currently pushed the branch switches that was discussed last
week, which is another step towards 1.0.

  This means that from now on:
  * All 'master' branches for GStreamer modules on git.freedesktop.org
are for 0.11/1.0 development
  * The previous master branches contents (i.e. tracking the 0.10
development) have been moved to '0.10' branches.

  IMPORTANT : DO NOT DO A GIT PULL IF YOU DO NOT KNOW WHAT YOU ARE
DOING ! Otherwise it will try to merge (or rebase) against a changed
remote branch.

  The easiest is :
  * fetch all remote commits : $ git remote update
    (That won't replace anything locally)
  * Change what upstream branches you are tracking (explained below)
  * And continue business as usual

  Care needs to be taken if you've been doing local development by
instructing which upstream branches to track. The generic command is:
  $ git branch <localbranch> --set-upstream <remote>/<branch>

  Examples:
  If you previously had a local branch called master, which was tracking
origin/master you need to locally instruct git to now track the
origin/0.10 branch:
  $ git branch master --set-upstream origin/0.10

  If you previously had a local branch called 0.11, which was tracking
origin/0.11, you need to locally instruct git to now track the
origin/master branch:
  $ git branch 0.11 --set-upstream origin/master

  And for those who need the full shabbang : If you had a local branch
called 'myawesomeidea', that you had called the freedesktop remote
'ponyrepository' and you were doing work for 0.10 you need to do:
  $ git branch myawesomeidea --set-upstream ponyrepository/0.10

  You can then confirm you've done the proper move by using "git
status".

  Once you have switched which upstream branches each of your local
branches is tracking, you're set.

  Enjoy the hacking and get ready for an awesome 1.0 !

    Edward

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: important : Git branch switch

Edward Hervey
Administrator
Just an example of what happens before/after switching, by using
gst-plugins-good as an example:

 gst-plugins-good $ git branch -v
 * master          a199ad9 speexdec: use base class tag handling helper

Now let's fetch the remote commits:

 gst-plugins-good $ git remote update -p
 Fetching origin
 remote: Counting objects: 1328, done.
 remote: Compressing objects: 100% (562/562), done.
 remote: Total 810 (delta 705), reused 275 (delta 248)
 Receiving objects: 100% (810/810), 149.95 KiB | 254 KiB/s, done.
 Resolving deltas: 100% (705/705), completed with 301 local objects.
 From ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
  + cdabb85...e780771 0.10       -> origin/0.10  (forced update)
    cb0d04a..02114c1  0.11       -> origin/0.11
    a199ad9..01838ff  master     -> origin/master
 From ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
  * [new tag]         RELEASE-0.11.2 -> RELEASE-0.11.2

Checking again our local status tells us we're waaay behind:

 gst-plugins-good $ git branch -v
 * master          a199ad9 [behind 798] speexdec: use base class ...

Let's switch master to track origin/0.10:
 gst-plugins-good $ git branch master --set-upstream origin/0.10
 Branch master set up to track remote branch 0.10 from origin.

And check it's fixed:

gst-plugins-good $ git branch -v
* master          a199ad9 [behind 20] speexdec: use base class tag ...

 \o/ Yay it's only 20 behind (which is normal since some commits
happened in 0.10 since I last fetched updates).

I can now fast forward to the current upstream state as usual.

  Hope this helps,

    Edward


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: important : Git branch switch

Stefan Sauer
In reply to this post by Edward Hervey
On 03/26/2012 05:23 PM, Edward Hervey wrote:

> Hello everyone,
>
>   Wim has currently pushed the branch switches that was discussed last
> week, which is another step towards 1.0.
>
>   This means that from now on:
>   * All 'master' branches for GStreamer modules on git.freedesktop.org
> are for 0.11/1.0 development
>   * The previous master branches contents (i.e. tracking the 0.10
> development) have been moved to '0.10' branches.
>
>   IMPORTANT : DO NOT DO A GIT PULL IF YOU DO NOT KNOW WHAT YOU ARE
> DOING ! Otherwise it will try to merge (or rebase) against a changed
> remote branch.
>
>   The easiest is :
>   * fetch all remote commits : $ git remote update
>     (That won't replace anything locally)
>   * Change what upstream branches you are tracking (explained below)
>   * And continue business as usual
>
>   Care needs to be taken if you've been doing local development by
> instructing which upstream branches to track. The generic command is:
>   $ git branch <localbranch> --set-upstream <remote>/<branch>
>
>   Examples:
>   If you previously had a local branch called master, which was tracking
> origin/master you need to locally instruct git to now track the
> origin/0.10 branch:
>   $ git branch master --set-upstream origin/0.10
>
>   If you previously had a local branch called 0.11, which was tracking
> origin/0.11, you need to locally instruct git to now track the
> origin/master branch:
>   $ git branch 0.11 --set-upstream origin/master
This seems to be just half of the story. I did all the above which
worked fine, but somehow git was pushing still on the 0.11 branch :/
Here is the .git/config and below the shell session.

Stefan

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
[branch "0.11"]
    remote = origin
    merge = refs/heads/master
[submodule "common"]
    url = git://anongit.freedesktop.org/gstreamer/common



ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
git pull --rebase
remote: Counting objects: 101, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 58 (delta 53), reused 0 (delta 0)
Unpacking objects: 100% (58/58), done.
From ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
   eccb5b8..9e2f23c  master     -> origin/master
First, rewinding head to replay your work on top of it...
Applying: wavpackparse: init datastructure

ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
git push --dry-run
To ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
   02114c1..62a5b1b  HEAD -> 0.11

ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
git push
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 460 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
sending e-mail for 75d33dbd432ace99da5fb672bd1ccc9438b05d82
sending e-mail for fa436c0799039c15afb1ac3422241d3e3e2a24de
sending e-mail for cfe58e71568b5835bcd7724f148718178801629a
sending e-mail for 01838ff97512a8a97c12136f8095e5874ab46d2b
sending e-mail for b7f448b9ae56d005847541c856f05dd108b50792
sending e-mail for 4bbc2a7106cf491ffda4a32ad783b14aa5ef4dce
sending e-mail for a34cbc7637c05dbc76bc613a626564066bba72de
sending e-mail for 1ed37c8229f450008c591d442dba3f1e722969e9
sending e-mail for e5ab3cc0a0d35652b987aae43f9f409b222a7498
sending e-mail for bdb60766b43b67ac31403c70e3b617502d14372e
sending e-mail for 9c1787851d7f7023a7f575c7bc047c9c4168d543
sending e-mail for 85bf98fe1acb15047552f3fc57300e89c4a8af9d
sending e-mail for 117de9fd471301ffcfdd17b27ed7c404cd3f3788
sending e-mail for eccb5b8fedeb6b4301d36ae3e3a6a6693a4cf8f3
sending e-mail for 098d8ceae7e46f0c3226390dbf241fa423cf0340
sending e-mail for 8f52f8c5c805b1747fb65dc4ebe872e96c17eafc
sending e-mail for e310ee82188f2580f316c43ae1e5810786333d0f
sending e-mail for 9e2f23c5bc9407c5eef24513c48dd56d2d84a081
sending e-mail for 62a5b1bf53a520ca5a07cc8676580a377a188efe
To ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
   02114c1..62a5b1b  HEAD -> 0.11

>   And for those who need the full shabbang : If you had a local branch
> called 'myawesomeidea', that you had called the freedesktop remote
> 'ponyrepository' and you were doing work for 0.10 you need to do:
>   $ git branch myawesomeidea --set-upstream ponyrepository/0.10
>
>   You can then confirm you've done the proper move by using "git
> status".
>
>   Once you have switched which upstream branches each of your local
> branches is tracking, you're set.
>
>   Enjoy the hacking and get ready for an awesome 1.0 !
>
>     Edward
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: important : Git branch switch

Stefan Sauer
On 03/27/2012 08:29 PM, Stefan Sauer wrote:

> On 03/26/2012 05:23 PM, Edward Hervey wrote:
>> Hello everyone,
>>
>>   Wim has currently pushed the branch switches that was discussed last
>> week, which is another step towards 1.0.
>>
>>   This means that from now on:
>>   * All 'master' branches for GStreamer modules on git.freedesktop.org
>> are for 0.11/1.0 development
>>   * The previous master branches contents (i.e. tracking the 0.10
>> development) have been moved to '0.10' branches.
>>
>>   IMPORTANT : DO NOT DO A GIT PULL IF YOU DO NOT KNOW WHAT YOU ARE
>> DOING ! Otherwise it will try to merge (or rebase) against a changed
>> remote branch.
>>
>>   The easiest is :
>>   * fetch all remote commits : $ git remote update
>>     (That won't replace anything locally)
>>   * Change what upstream branches you are tracking (explained below)
>>   * And continue business as usual
>>
>>   Care needs to be taken if you've been doing local development by
>> instructing which upstream branches to track. The generic command is:
>>   $ git branch <localbranch> --set-upstream <remote>/<branch>
>>
>>   Examples:
>>   If you previously had a local branch called master, which was tracking
>> origin/master you need to locally instruct git to now track the
>> origin/0.10 branch:
>>   $ git branch master --set-upstream origin/0.10
>>
>>   If you previously had a local branch called 0.11, which was tracking
>> origin/0.11, you need to locally instruct git to now track the
>> origin/master branch:
>>   $ git branch 0.11 --set-upstream origin/master
> This seems to be just half of the story. I did all the above which
> worked fine, but somehow git was pushing still on the 0.11 branch :/

Okay, here is what I had to do in addition:
git branch -m 0.11 master

Stefan

> Here is the .git/config and below the shell session.
>
> Stefan
>
> [core]
>     repositoryformatversion = 0
>     filemode = true
>     bare = false
>     logallrefupdates = true
> [remote "origin"]
>     fetch = +refs/heads/*:refs/remotes/origin/*
>     url = ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
> [branch "0.11"]
>     remote = origin
>     merge = refs/heads/master
> [submodule "common"]
>     url = git://anongit.freedesktop.org/gstreamer/common
>
>
>
> ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
> git pull --rebase
> remote: Counting objects: 101, done.
> remote: Compressing objects: 100% (58/58), done.
> remote: Total 58 (delta 53), reused 0 (delta 0)
> Unpacking objects: 100% (58/58), done.
> From ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
>    eccb5b8..9e2f23c  master     -> origin/master
> First, rewinding head to replay your work on top of it...
> Applying: wavpackparse: init datastructure
>
> ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
> git push --dry-run
> To ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
>    02114c1..62a5b1b  HEAD -> 0.11
>
> ensonic@sawtooth:~/projects/gstreamer/0.11/gst-plugins-good:(git:0.11)>
> git push
> Counting objects: 9, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (5/5), done.
> Writing objects: 100% (5/5), 460 bytes, done.
> Total 5 (delta 4), reused 0 (delta 0)
> sending e-mail for 75d33dbd432ace99da5fb672bd1ccc9438b05d82
> sending e-mail for fa436c0799039c15afb1ac3422241d3e3e2a24de
> sending e-mail for cfe58e71568b5835bcd7724f148718178801629a
> sending e-mail for 01838ff97512a8a97c12136f8095e5874ab46d2b
> sending e-mail for b7f448b9ae56d005847541c856f05dd108b50792
> sending e-mail for 4bbc2a7106cf491ffda4a32ad783b14aa5ef4dce
> sending e-mail for a34cbc7637c05dbc76bc613a626564066bba72de
> sending e-mail for 1ed37c8229f450008c591d442dba3f1e722969e9
> sending e-mail for e5ab3cc0a0d35652b987aae43f9f409b222a7498
> sending e-mail for bdb60766b43b67ac31403c70e3b617502d14372e
> sending e-mail for 9c1787851d7f7023a7f575c7bc047c9c4168d543
> sending e-mail for 85bf98fe1acb15047552f3fc57300e89c4a8af9d
> sending e-mail for 117de9fd471301ffcfdd17b27ed7c404cd3f3788
> sending e-mail for eccb5b8fedeb6b4301d36ae3e3a6a6693a4cf8f3
> sending e-mail for 098d8ceae7e46f0c3226390dbf241fa423cf0340
> sending e-mail for 8f52f8c5c805b1747fb65dc4ebe872e96c17eafc
> sending e-mail for e310ee82188f2580f316c43ae1e5810786333d0f
> sending e-mail for 9e2f23c5bc9407c5eef24513c48dd56d2d84a081
> sending e-mail for 62a5b1bf53a520ca5a07cc8676580a377a188efe
> To ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good
>    02114c1..62a5b1b  HEAD -> 0.11
>
>>   And for those who need the full shabbang : If you had a local branch
>> called 'myawesomeidea', that you had called the freedesktop remote
>> 'ponyrepository' and you were doing work for 0.10 you need to do:
>>   $ git branch myawesomeidea --set-upstream ponyrepository/0.10
>>
>>   You can then confirm you've done the proper move by using "git
>> status".
>>
>>   Once you have switched which upstream branches each of your local
>> branches is tracking, you're set.
>>
>>   Enjoy the hacking and get ready for an awesome 1.0 !
>>
>>     Edward
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel