{"thread":{"id":"10805","subject":"(unknown)","startedAt":"2007-11-11T13:08:48Z","lastAt":"2007-11-12T10:47:52Z","messageCount":5,"participants":["Michael Dressel","Johannes Schindelin","MichaelTiloDressel@t-online.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"59317","messageId":"Pine.LNX.4.64.0711111359590.9401@castor.milkiway.cos","threadId":"10805","inReplyTo":null,"subject":"(unknown)","fromName":"Michael Dressel","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2007-11-11T13:08:48Z","receivedAt":"2007-11-11T13:08:48Z","isPatch":false,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\n>Michael Dressel wrote:\n>Ok nice. Another thing is that git-push will push all the tracking \n>branches in refs/remotes/origin. \n\nI learned that I only have to edit the .git/config file to avoid that \ngit-push pushes everything. \n\nI modified the remotes names and added push lines explicitly.\n\nIs that the recommended way?\n\nIn my example (git-branch -a -v):\n* exp                 aa854c6 shtest 4\n  master              34924b9 mastertest 1\n  origin/exp          aa854c6 shtest 4\n  origin/master       b68e7a9 brt master 1\n\nI used the following .git/config:\n[core]\n        repositoryformatversion = 0\n        filemode = true\n        bare = false\n        logallrefupdates = true\n[remote \"origin1\"]\n        url = /home/repo/src\n        fetch = +refs/heads/master:refs/remotes/origin/master\n        push = +refs/heads/master:refs/heads/master\n[remote \"origin2\"]\n        url = /home/repo/src\n        fetch = +refs/heads/exp:refs/remotes/origin/exp\n        push = +refs/heads/exp:refs/heads/exp\n[branch \"master\"]\n        remote = origin1\n        merge = refs/heads/master\n[branch \"exp\"]\n        remote = origin2\n        merge = refs/heads/exp\n\nCheers,\nMichael\n"},{"id":"59333","messageId":"Pine.LNX.4.64.0711111520260.4362@racer.site","threadId":"10805","inReplyTo":"Pine.LNX.4.64.0711111359590.9401@castor.milkiway.cos","subject":"Re: (no subject)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-11T15:22:56Z","receivedAt":"2007-11-11T15:22:56Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 11 Nov 2007, Michael Dressel wrote:\n\n> \n> >Michael Dressel wrote:\n> >Ok nice. Another thing is that git-push will push all the tracking \n> >branches in refs/remotes/origin. \n> \n> I learned that I only have to edit the .git/config file to avoid that \n> git-push pushes everything. \n\nIt is documented that you can use \"git push origin <branchname>\".\n\n> [remote \"origin1\"]\n>         url = /home/repo/src\n>         fetch = +refs/heads/master:refs/remotes/origin/master\n>         push = +refs/heads/master:refs/heads/master\n\nWith \"push\", it is not necessary to specify the \":<target>\".\n\nAlso, if \"master\" is unambiguous, you can write just \"master\" instead of \n\"refs/heads/master\".\n\nFurthermore, I suggest not forcing (that's  what \"+\" does) the push, since \nit is quite possible that you push something old in the wrong direction.  \n\nHth,\nDscho\n"},{"id":"59436","messageId":"1IrUDz-01jF4a0@fwd29.aul.t-online.de","threadId":"10805","inReplyTo":"Pine.LNX.4.64.0711111520260.4362@racer.site","subject":"Re: cogito remote branch","fromName":"MichaelTiloDressel@t-online.de","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2007-11-12T08:00:50Z","receivedAt":"2007-11-12T08:00:50Z","isPatch":false,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\n(I forgot to put the subject previously)\n\n> Johannes Schindelin wrote:\n>Hi,\n\n>On Sun, 11 Nov 2007, Michael Dressel wrote:\n\n>> \n>> >Michael Dressel wrote:\n>> >Ok nice. Another thing is that git-push will push all the tracking \n>> >branches in refs/remotes/origin. \n>> \n>> I learned that I only have to edit the .git/config file to avoid that\n\n>> git-push pushes everything. \n\n>It is documented that you can use \"git push origin \".\n\n>> [remote \"origin1\"]\n>>         url = /home/repo/src\n>>         fetch = +refs/heads/master:refs/remotes/origin/master\n>>         push = +refs/heads/master:refs/heads/master\n\n>With \"push\", it is not necessary to specify the \":\".\nSo just a line like\n             push = master\n\nA push is needed somewhere in order to prevent every remote to be pushed\nby default,\nright?\n\n>Also, if \"master\" is unambiguous, you can write just \"master\" instead\nof \n>\"refs/heads/master\".\n\n>Furthermore, I suggest not forcing (that's  what \"+\" does) the push,\nsince \n>it is quite possible that you push something old in the wrong\ndirection.  \n\nO.k. I will reconsider this.\n\nCheers,\nMichael\n"},{"id":"59451","messageId":"Pine.LNX.4.64.0711120954460.4362@racer.site","threadId":"10805","inReplyTo":"1IrUDz-01jF4a0@fwd29.aul.t-online.de","subject":"Re: cogito remote branch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-12T09:55:43Z","receivedAt":"2007-11-12T09:55:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 12 Nov 2007, MichaelTiloDressel@t-online.de wrote:\n\n> So just a line like\n>              push = master\n\nExactly.\n\n> A push is needed somewhere in order to prevent every remote to be pushed \n> by default, right?\n\nYou mean a \"push\" config variable?  No.  I think I mentioned in my first \nreply that\n\n\tgit push <remote> <branch>...\n\nworks quite wonderfully.\n\nHth,\nDscho\n"},{"id":"59460","messageId":"1IrWpc-0kFExM0@fwd28.aul.t-online.de","threadId":"10805","inReplyTo":"Pine.LNX.4.64.0711120954460.4362@racer.site","subject":"Re: cogito remote branch","fromName":"MichaelTiloDressel@t-online.de","fromEmail":"michaeltilodressel@t-online.de","sentAt":"2007-11-12T10:47:52Z","receivedAt":"2007-11-12T10:47:52Z","isPatch":false,"sender":{"key":"michaeltilodressel@t-online.de","avatar":null},"body":"\nJohannes Schindelin wrote:\n\n>> A push is needed somewhere in order to prevent every remote to be\npushed \n>> by default, right?\n\n>You mean a \"push\" config variable?  No.  I think I mentioned in my\nfirst \n>reply that\n\n>\tgit push  <remote> <branch>...\n\n>works quite wonderfully.\n\nI mean a push = .. line in the [remote <name>] block.\nAnd if there is such a line than git-push without arguments will push\nonly\nthe current branch. For me that is nice, because if I forgot to give \nan argument to git-push it will not push other branches.\n\nIf there is no such line all the remotes (that don't have a push line?) \nget pushed. \n\nCheers,\nMichael\n"}]}