Discussion:
Question about archer branch managment
Pierre Muller
2011-02-24 11:26:01 UTC
Permalink
I have one more question:

In the branch creation explanation:

This makes a local branch. If you want to mirror this local branch on
the archer server (which we encourage -- it is better to share), push it:

$ git push origin
archer-tromey-explosion-project:archer-tromey-explosion-project

Note that this command is only useful the first time you push your branch to

the repository. For subsequent pushes, you should omit master:

$ git push origin archer-tromey-explosion-project

What does omit master mean here?
There is no master in the first "git push"


Pierre Muller
GDB pascal language maintainer
Joel Brobecker
2011-02-24 11:32:28 UTC
Permalink
Post by Pierre Muller
This makes a local branch. If you want to mirror this local branch on
$ git push origin
archer-tromey-explosion-project:archer-tromey-explosion-project
Note that this command is only useful the first time you push your branch to
$ git push origin archer-tromey-explosion-project
Hmmm, I thought that

$ git push origin archer-tromey-explosion-project

would have worked right from the get go...
--
Joel
Jan Kratochvil
2011-02-27 17:50:03 UTC
Permalink
Post by Joel Brobecker
Hmmm, I thought that
$ git push origin archer-tromey-explosion-project
would have worked right from the get go...
Really not:
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin ;cd ../1;git branch;cd ..
Switched to a new branch 'x'
Everything up-to-date
* master
but
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin x:x;cd ../1;git branch;cd ..
Switched to a new branch 'x'
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/gittest3/1
* [new branch] x -> x
* master
x

Regards,
Jan
Joel Brobecker
2011-02-27 18:17:52 UTC
Permalink
Post by Jan Kratochvil
Post by Joel Brobecker
Hmmm, I thought that
$ git push origin archer-tromey-explosion-project
would have worked right from the get go...
(I don't know if I'm the only one feeling that way, but your style
is insanely compact for my brain - it often takes a long time to
understand what you're trying to say sometimes)
Post by Jan Kratochvil
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin ;cd ../1;git branch;cd ..
Switched to a new branch 'x'
Everything up-to-date
* master
but
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin x:x;cd ../1;git branch;cd ..
Switched to a new branch 'x'
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/gittest3/1
* [new branch] x -> x
* master
x
I think I didn't express myself clearly. All I was trying to say is
that "x:x" in a "git push" command is equivalent to "x". I wasn't
understanding the reasoning behind the instructions, but maybe I was
missing something, or making the wrong assumption somewhere (I was
assuming that Pierre named both local and remote branches with
the same name).
--
Joel
Jan Kratochvil
2011-02-27 18:58:45 UTC
Permalink
Post by Joel Brobecker
(I don't know if I'm the only one feeling that way, but your style
is insanely compact for my brain - it often takes a long time to
understand what you're trying to say sometimes)
Thanks for the feedback, still in this case I believe the problem was
Post by Joel Brobecker
Post by Jan Kratochvil
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin ;cd ../1;git branch;cd ..
+
Post by Joel Brobecker
Post by Jan Kratochvil
$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin x:x;cd ../1;git branch;cd ..
I think I didn't express myself clearly.
This is completely a mistake on my side. I tested something different than
what you said.

$ rm -rf 1 2;mkdir 1 2;cd 1;git init;touch f;git add f;git commit -m f f;cd ..;git clone 1 2;cd 2;git checkout -b x;git push origin x ;cd ../1;git branch;cd ..
Switched to a new branch 'x'
Total 0 (delta 0), reused 0 (delta 0)
To /tmp/gittest3/1
* [new branch] x -> x
* master
x

It really works the way you say. I have updated the Wiki now:
http://sourceware.org/gdb/wiki/ArcherBranchManagement?action=diff&rev2=121&rev1=120
Post by Joel Brobecker
All I was trying to say is
that "x:x" in a "git push" command is equivalent to "x".
Yes, it is. I did not know it myself.


Thanks,
Jan

Jan Kratochvil
2011-02-27 17:51:43 UTC
Permalink
Post by Pierre Muller
$ git push origin
archer-tromey-explosion-project:archer-tromey-explosion-project
Note that this command is only useful the first time you push your branch to
$ git push origin archer-tromey-explosion-project
What does omit master mean here?
There is no master in the first "git push"
One can call probably `master' either `archer-tromey-explosion-project' on the
left or `archer-tromey-explosion-project' on the right - it is important there
should no longer be any colon (':'). Anyway the examples work as intended so
I am not sure how they should be commented.


Regards,
Jan
Loading...