All of lore.kernel.org
 help / color / mirror / Atom feed
* (unknown)
@ 2007-11-11 13:08 Michael Dressel
  2007-11-11 15:22 ` (no subject) Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Dressel @ 2007-11-11 13:08 UTC (permalink / raw)
  To: git


>Michael Dressel wrote:
>Ok nice. Another thing is that git-push will push all the tracking 
>branches in refs/remotes/origin. 

I learned that I only have to edit the .git/config file to avoid that 
git-push pushes everything. 

I modified the remotes names and added push lines explicitly.

Is that the recommended way?

In my example (git-branch -a -v):
* exp                 aa854c6 shtest 4
  master              34924b9 mastertest 1
  origin/exp          aa854c6 shtest 4
  origin/master       b68e7a9 brt master 1

I used the following .git/config:
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin1"]
        url = /home/repo/src
        fetch = +refs/heads/master:refs/remotes/origin/master
        push = +refs/heads/master:refs/heads/master
[remote "origin2"]
        url = /home/repo/src
        fetch = +refs/heads/exp:refs/remotes/origin/exp
        push = +refs/heads/exp:refs/heads/exp
[branch "master"]
        remote = origin1
        merge = refs/heads/master
[branch "exp"]
        remote = origin2
        merge = refs/heads/exp

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: (no subject)
  2007-11-11 13:08 (unknown) Michael Dressel
@ 2007-11-11 15:22 ` Johannes Schindelin
  2007-11-12  8:00   ` cogito remote branch MichaelTiloDressel
  0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-11-11 15:22 UTC (permalink / raw)
  To: Michael Dressel; +Cc: git

Hi,

On Sun, 11 Nov 2007, Michael Dressel wrote:

> 
> >Michael Dressel wrote:
> >Ok nice. Another thing is that git-push will push all the tracking 
> >branches in refs/remotes/origin. 
> 
> I learned that I only have to edit the .git/config file to avoid that 
> git-push pushes everything. 

It is documented that you can use "git push origin <branchname>".

> [remote "origin1"]
>         url = /home/repo/src
>         fetch = +refs/heads/master:refs/remotes/origin/master
>         push = +refs/heads/master:refs/heads/master

With "push", it is not necessary to specify the ":<target>".

Also, if "master" is unambiguous, you can write just "master" instead of 
"refs/heads/master".

Furthermore, I suggest not forcing (that's  what "+" does) the push, since 
it is quite possible that you push something old in the wrong direction.  

Hth,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-11 15:22 ` (no subject) Johannes Schindelin
@ 2007-11-12  8:00   ` MichaelTiloDressel
  2007-11-12  9:55     ` Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: MichaelTiloDressel @ 2007-11-12  8:00 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git


(I forgot to put the subject previously)

> Johannes Schindelin wrote:
>Hi,

>On Sun, 11 Nov 2007, Michael Dressel wrote:

>> 
>> >Michael Dressel wrote:
>> >Ok nice. Another thing is that git-push will push all the tracking 
>> >branches in refs/remotes/origin. 
>> 
>> I learned that I only have to edit the .git/config file to avoid that

>> git-push pushes everything. 

>It is documented that you can use "git push origin ".

>> [remote "origin1"]
>>         url = /home/repo/src
>>         fetch = +refs/heads/master:refs/remotes/origin/master
>>         push = +refs/heads/master:refs/heads/master

>With "push", it is not necessary to specify the ":".
So just a line like
             push = master

A push is needed somewhere in order to prevent every remote to be pushed
by default,
right?

>Also, if "master" is unambiguous, you can write just "master" instead
of 
>"refs/heads/master".

>Furthermore, I suggest not forcing (that's  what "+" does) the push,
since 
>it is quite possible that you push something old in the wrong
direction.  

O.k. I will reconsider this.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-12  8:00   ` cogito remote branch MichaelTiloDressel
@ 2007-11-12  9:55     ` Johannes Schindelin
  2007-11-12 10:47       ` MichaelTiloDressel
  0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-11-12  9:55 UTC (permalink / raw)
  To: MichaelTiloDressel; +Cc: git

Hi,

On Mon, 12 Nov 2007, MichaelTiloDressel@t-online.de wrote:

> So just a line like
>              push = master

Exactly.

> A push is needed somewhere in order to prevent every remote to be pushed 
> by default, right?

You mean a "push" config variable?  No.  I think I mentioned in my first 
reply that

	git push <remote> <branch>...

works quite wonderfully.

Hth,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-12  9:55     ` Johannes Schindelin
@ 2007-11-12 10:47       ` MichaelTiloDressel
  0 siblings, 0 replies; 15+ messages in thread
From: MichaelTiloDressel @ 2007-11-12 10:47 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git


Johannes Schindelin wrote:

>> A push is needed somewhere in order to prevent every remote to be
pushed 
>> by default, right?

>You mean a "push" config variable?  No.  I think I mentioned in my
first 
>reply that

>	git push  <remote> <branch>...

>works quite wonderfully.

I mean a push = .. line in the [remote <name>] block.
And if there is such a line than git-push without arguments will push
only
the current branch. For me that is nice, because if I forgot to give 
an argument to git-push it will not push other branches.

If there is no such line all the remotes (that don't have a push line?) 
get pushed. 

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
@ 2007-11-11 13:11 Michael Dressel
  0 siblings, 0 replies; 15+ messages in thread
From: Michael Dressel @ 2007-11-11 13:11 UTC (permalink / raw)
  To: git



>Michael Dressel wrote:
>Ok nice. Another thing is that git-push will push all the tracking 
>branches in refs/remotes/origin. 

I learned that I only have to edit the .git/config file to avoid that 
git-push pushes everything. 

I modified the remotes names and added push lines explicitly.

Is that the recommended way?

In my example (git-branch -a -v):
* exp                 aa854c6 shtest 4
  master              34924b9 mastertest 1
  origin/exp          aa854c6 shtest 4
  origin/master       b68e7a9 brt master 1

I used the following .git/config:
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin1"]
        url = /home/repo/src
        fetch = +refs/heads/master:refs/remotes/origin/master
        push = +refs/heads/master:refs/heads/master
[remote "origin2"]
        url = /home/repo/src
        fetch = +refs/heads/exp:refs/remotes/origin/exp
        push = +refs/heads/exp:refs/heads/exp
[branch "master"]
        remote = origin1
        merge = refs/heads/master
[branch "exp"]
        remote = origin2
        merge = refs/heads/exp

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
@ 2007-11-10 12:35 Michael Dressel
  0 siblings, 0 replies; 15+ messages in thread
From: Michael Dressel @ 2007-11-10 12:35 UTC (permalink / raw)
  To: jnareb; +Cc: git

>Michael Dressel wrote:
>> On Fri, 9 Nov 2007, Jon Loeliger wrote: 
>>> On Fri, 2007-11-09 at 10:10, MichaelTiloDressel@t-online.de wrote:
>>>
>>>>  There are just some features
>>>> which simplify things for me in cogito. E.g. in cogito in the 
simplest
>>>> way you don't need to be aware of the index. While with git
>>>> you have to remember to add the changes to the index explicitly
>>>> to get them committed. 
>>> 
>>> "git commit -a ..." might be useful for you.
>>> 
>>> Other lingering cogito-isms you think are lacking in git?
>> 
>> Thanks for the hint. I have to use git for a while to understand what 
may 
>> still be lacking (at least for me, if at all). Off the top of my head 
one 
>> other difference is that if I do a cg-push the remote (or origin) head 
is 
>> updated automatically, I think.

Jakub Narebski wrote:
>If you mean that tracking branches are updated on push, this is what
>git also does from some time (perhaps not in released version, so please
>wait or run 'master').

Ok nice. Another thing is that git-push will push all the tracking 
branches in refs/remotes/origin. 

I was wondering if it was possible to have some cogito like wrapper 
scripts (lets say kg-...) for git again which would use the git commands 
with some arguments in order to resemble the cogito behavior 
even more closely. But it dawned on me that this would most likely end up 
in a rather large amount of script code again.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-10 11:27           ` Michael Dressel
@ 2007-11-10 11:52             ` Jakub Narebski
  0 siblings, 0 replies; 15+ messages in thread
From: Jakub Narebski @ 2007-11-10 11:52 UTC (permalink / raw)
  To: git

Michael Dressel wrote:
> On Fri, 9 Nov 2007, Jon Loeliger wrote: 
>> On Fri, 2007-11-09 at 10:10, MichaelTiloDressel@t-online.de wrote:
>>
>>>  There are just some features
>>> which simplify things for me in cogito. E.g. in cogito in the simplest
>>> way you don't need to be aware of the index. While with git
>>> you have to remember to add the changes to the index explicitly
>>> to get them committed. 
>> 
>> "git commit -a ..." might be useful for you.
>> 
>> Other lingering cogito-isms you think are lacking in git?
> 
> Thanks for the hint. I have to use git for a while to understand what may 
> still be lacking (at least for me, if at all). Off the top of my head one 
> other difference is that if I do a cg-push the remote (or origin) head is 
> updated automatically, I think.

If you mean that tracking branches are updated on push, this is what
git also does from some time (perhaps not in released version, so please
wait or run 'master').

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 16:28         ` Jon Loeliger
@ 2007-11-10 11:27           ` Michael Dressel
  2007-11-10 11:52             ` Jakub Narebski
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Dressel @ 2007-11-10 11:27 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: Johannes Schindelin, Git List



On Fri, 9 Nov 2007, Jon Loeliger wrote:

> On Fri, 2007-11-09 at 10:10, MichaelTiloDressel@t-online.de wrote:
> >  There are just some features
> > which simplify things for me in cogito. E.g. in cogito in the simplest
> > way you don't need to be aware of the index. While with git
> > you have to remember to add the changes to the index explicitly
> > to get them committed. 
> > 
> > Cheers,
> > Michael
> 
> "git commit -a ..." might be useful for you.
> 
> Other lingering cogito-isms you think are lacking in git?

Thanks for the hint. I have to use git for a while to understand what may 
still be lacking (at least for me, if at all). Off the top of my head one 
other difference is that if I do a cg-push the remote (or origin) head is 
updated automatically, I think.

Cheers,
Michael 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 16:10       ` MichaelTiloDressel
@ 2007-11-09 16:28         ` Jon Loeliger
  2007-11-10 11:27           ` Michael Dressel
  0 siblings, 1 reply; 15+ messages in thread
From: Jon Loeliger @ 2007-11-09 16:28 UTC (permalink / raw)
  To: MichaelTiloDressel; +Cc: Johannes Schindelin, Git List

On Fri, 2007-11-09 at 10:10, MichaelTiloDressel@t-online.de wrote:
>  There are just some features
> which simplify things for me in cogito. E.g. in cogito in the simplest
> way you don't need to be aware of the index. While with git
> you have to remember to add the changes to the index explicitly
> to get them committed. 
> 
> Cheers,
> Michael

"git commit -a ..." might be useful for you.

Other lingering cogito-isms you think are lacking in git?

jdl

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 14:17     ` Johannes Schindelin
@ 2007-11-09 16:10       ` MichaelTiloDressel
  2007-11-09 16:28         ` Jon Loeliger
  0 siblings, 1 reply; 15+ messages in thread
From: MichaelTiloDressel @ 2007-11-09 16:10 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git



>> Such a pity.  We just got used to it.

>t's open source.  You are free to use/maintain it.

True. But I'm not sure if it would be worth the effort. 
I don't mind using git directly. There are just some features
which simplify things for me in cogito. E.g. in cogito in the simplest
way you don't need to be aware of the index. While with git
you have to remember to add the changes to the index explicitly
to get them committed. 

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 13:51   ` MichaelTiloDressel
@ 2007-11-09 14:17     ` Johannes Schindelin
  2007-11-09 16:10       ` MichaelTiloDressel
  0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-11-09 14:17 UTC (permalink / raw)
  To: MichaelTiloDressel; +Cc: Andreas Ericsson, git

Hi,

On Fri, 9 Nov 2007, MichaelTiloDressel@t-online.de wrote:

> Such a pity.  We just got used to it.

It's open source.  You are free to use/maintain it.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 13:20 ` Andreas Ericsson
@ 2007-11-09 13:51   ` MichaelTiloDressel
  2007-11-09 14:17     ` Johannes Schindelin
  0 siblings, 1 reply; 15+ messages in thread
From: MichaelTiloDressel @ 2007-11-09 13:51 UTC (permalink / raw)
  To: Andreas Ericsson; +Cc: git


Such a pity.  We just got used to it.

-----Original Message-----
Date: Fri, 09 Nov 2007 14:20:05 +0100
Subject: Re: cogito remote branch
From: Andreas Ericsson 
To: "MichaelTiloDressel@t-online.de" 

MichaelTiloDressel@t-online.de wrote:
> Hi,
> 
> I just saw the scripts cg-update, cg-push ..  scripts try to guess a
> branch name functioning as origin if no argument is given. These
scripts
> seam to use a branch named -origin if it exists and the
> current
> branch is named  and is not the branch named master.
> 
> I like that feature. Is it anywhere documented?
> 
> In case there is no branch named -origin the scripts just
> use origin even if the current branch is not master. I would prefer
the
> scripts to fail in this case and to print a message asking the user to
> specifically name a branch.
> 

Cogito is deprecated, and has been for quite some time. The "remote"
feature of core git (inspired by cogito) offers similar benefits.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: cogito remote branch
  2007-11-09 13:16 MichaelTiloDressel
@ 2007-11-09 13:20 ` Andreas Ericsson
  2007-11-09 13:51   ` MichaelTiloDressel
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Ericsson @ 2007-11-09 13:20 UTC (permalink / raw)
  To: MichaelTiloDressel; +Cc: git

MichaelTiloDressel@t-online.de wrote:
> Hi,
> 
> I just saw the scripts cg-update, cg-push ..  scripts try to guess a
> branch name functioning as origin if no argument is given. These scripts
> seam to use a branch named <branchname>-origin if it exists and the
> current
> branch is named <branchname> and is not the branch named master.
> 
> I like that feature. Is it anywhere documented?
> 
> In case there is no branch named <branchname>-origin the scripts just
> use origin even if the current branch is not master. I would prefer the
> scripts to fail in this case and to print a message asking the user to
> specifically name a branch.
> 

Cogito is deprecated, and has been for quite some time. The "remote"
feature of core git (inspired by cogito) offers similar benefits.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply	[flat|nested] 15+ messages in thread

* cogito remote branch
@ 2007-11-09 13:16 MichaelTiloDressel
  2007-11-09 13:20 ` Andreas Ericsson
  0 siblings, 1 reply; 15+ messages in thread
From: MichaelTiloDressel @ 2007-11-09 13:16 UTC (permalink / raw)
  To: git

Hi,

I just saw the scripts cg-update, cg-push ..  scripts try to guess a
branch name functioning as origin if no argument is given. These scripts
seam to use a branch named <branchname>-origin if it exists and the
current
branch is named <branchname> and is not the branch named master.

I like that feature. Is it anywhere documented?

In case there is no branch named <branchname>-origin the scripts just
use origin even if the current branch is not master. I would prefer the
scripts to fail in this case and to print a message asking the user to
specifically name a branch.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-11-12 10:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-11 13:08 (unknown) Michael Dressel
2007-11-11 15:22 ` (no subject) Johannes Schindelin
2007-11-12  8:00   ` cogito remote branch MichaelTiloDressel
2007-11-12  9:55     ` Johannes Schindelin
2007-11-12 10:47       ` MichaelTiloDressel
  -- strict thread matches above, loose matches on Subject: below --
2007-11-11 13:11 Michael Dressel
2007-11-10 12:35 Michael Dressel
2007-11-09 13:16 MichaelTiloDressel
2007-11-09 13:20 ` Andreas Ericsson
2007-11-09 13:51   ` MichaelTiloDressel
2007-11-09 14:17     ` Johannes Schindelin
2007-11-09 16:10       ` MichaelTiloDressel
2007-11-09 16:28         ` Jon Loeliger
2007-11-10 11:27           ` Michael Dressel
2007-11-10 11:52             ` Jakub Narebski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.