Re: [git-users] how to push indepedent repos to individual branches in remote in git?
Thanks. I will try it out. On Tue, Dec 1, 2015 at 1:08 AM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Mon, 30 Nov 2015 23:15:32 +0530 > rajdeep mondal wrote: > > > 1. i have repos: > > A with branches A1, A2, A3 > > B with branches B1, B2, B3 etc > > > > 2. i want to push these 2 independent repo to a central repo MY_REPO > > > > as branch A and branch B > > > > > > 3. The A1, A2, A3 are subbranches of branch A > > > > 4. B1, B2. B3 are subbranches of the branch B > > OK, that's clearer now. > > The problem is that branches in Git do not form any sort of hierarchy > -- except for being related through the parts of history they may share. > > Well, may be you just meant naming? > Like in `push origin A1 A/A1 B1 B/B1` ? > If yes, then: > > 1) In repo A, do: > >git push central 'refs/heads/*:refs/heads/A/*' > > 2) In repo B, do: > >git push central 'refs/heads/*:refs/heads/B/*' > > Note that it won't push other sorts of refs (tags, notes, whatever else > you might have). Pushing those would require a similar approach. > > If that's what you really wanted, it worth repeating that when you push > A1 to A/A1, the remote A1 is not "a subbranch of A", it's a branch > named "A/A1". If you'd push to A\A1 or A%A1 or any other similar > "strange" name, the result would be the same: a branch with a funky > name. IOW, the fact some parts of Git use "/" for some sort of > "namespacing" of refs is just a convention. People are free to use it, > too, just keep in mind this thing is simpler than it appears. > -- == Rajdeep Nvidia Graphics Pvt Ltd C-1 Wing A ' Jacaranda' Manyata Embassy Business Park Outer Ring Road Bangalore -560045 India == -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
On Mon, 30 Nov 2015 23:15:32 +0530 rajdeep mondal wrote: > 1. i have repos: > A with branches A1, A2, A3 > B with branches B1, B2, B3 etc > > 2. i want to push these 2 independent repo to a central repo MY_REPO > > as branch A and branch B > > > 3. The A1, A2, A3 are subbranches of branch A > > 4. B1, B2. B3 are subbranches of the branch B OK, that's clearer now. The problem is that branches in Git do not form any sort of hierarchy -- except for being related through the parts of history they may share. Well, may be you just meant naming? Like in `push origin A1 A/A1 B1 B/B1` ? If yes, then: 1) In repo A, do: git push central 'refs/heads/*:refs/heads/A/*' 2) In repo B, do: git push central 'refs/heads/*:refs/heads/B/*' Note that it won't push other sorts of refs (tags, notes, whatever else you might have). Pushing those would require a similar approach. If that's what you really wanted, it worth repeating that when you push A1 to A/A1, the remote A1 is not "a subbranch of A", it's a branch named "A/A1". If you'd push to A\A1 or A%A1 or any other similar "strange" name, the result would be the same: a branch with a funky name. IOW, the fact some parts of Git use "/" for some sort of "namespacing" of refs is just a convention. People are free to use it, too, just keep in mind this thing is simpler than it appears. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
Hi 1. i have repos: A with branches A1, A2, A3 B with branches B1, B2, B3 etc 2. i want to push these 2 independent repo to a central repo MY_REPO as branch A and branch B 3. The A1, A2, A3 are subbranches of branch A 4. B1, B2. B3 are subbranches of the branch B - rajdeep On Mon, Nov 30, 2015 at 9:48 PM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Mon, 30 Nov 2015 21:23:24 +0530 > rajdeep mondal wrote: > > > I tried something like > > > > git push local-remote -u 'refs/*:refs/$TREE_BRANCH/*' > > > > it did not work as expected. > > I wonder what was expected then. > To me, your invocation looks strange at best. > > Can you try to explain what you want to achieve in simple words? > > I mean, something like " > 1) I have a repo with branches A, B and C. > 2) I want to craft a command which would make branches A, B and C >end up ... in the remote repo I intend to push them to. > " > > Fill free to replace "..." in my description with something sensible. > So far, I fail to clearly understand your intent. > -- == Rajdeep Nvidia Graphics Pvt Ltd C-1 Wing A ' Jacaranda' Manyata Embassy Business Park Outer Ring Road Bangalore -560045 India == -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
On Mon, 30 Nov 2015 21:23:24 +0530 rajdeep mondal wrote: > I tried something like > > git push local-remote -u 'refs/*:refs/$TREE_BRANCH/*' > > it did not work as expected. I wonder what was expected then. To me, your invocation looks strange at best. Can you try to explain what you want to achieve in simple words? I mean, something like " 1) I have a repo with branches A, B and C. 2) I want to craft a command which would make branches A, B and C end up ... in the remote repo I intend to push them to. " Fill free to replace "..." in my description with something sensible. So far, I fail to clearly understand your intent. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
Hi I tried something like git push local-remote -u 'refs/*:refs/$TREE_BRANCH/*' it did not work as expected. On Mon, Nov 30, 2015 at 9:21 PM, Konstantin Khomoutov < flatw...@users.sourceforge.net> wrote: > On Sat, 28 Nov 2015 06:48:35 -0800 (PST) > justrajdeep wrote: > > > I want to push my entire local repo(present only with me) to a shared > > git repo as a branch in that. > > > > I can do something like > > > > git remote add local-remote $PATH_TO_REPO_LOCATION > > git push local-remote -u master:$TREE_BRANCH > > > > But this pushes only the master. Any way to push the whole thing with > > all its branches and everything? > > How about > > git push local-remote 'refs/*:refs/*' > > ? > -- == Rajdeep Nvidia Graphics Pvt Ltd C-1 Wing A ' Jacaranda' Manyata Embassy Business Park Outer Ring Road Bangalore -560045 India == -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
On Sat, 28 Nov 2015 06:48:35 -0800 (PST) justrajdeep wrote: > I want to push my entire local repo(present only with me) to a shared > git repo as a branch in that. > > I can do something like > > git remote add local-remote $PATH_TO_REPO_LOCATION > git push local-remote -u master:$TREE_BRANCH > > But this pushes only the master. Any way to push the whole thing with > all its branches and everything? How about git push local-remote 'refs/*:refs/*' ? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
Hi That wont push it to the branch. On Monday, November 30, 2015 at 3:12:06 PM UTC+5:30, Magnus Therning wrote: > > On Sat, Nov 28, 2015 at 06:48:35AM -0800, justrajdeep wrote: > > Hi > > > > I want to push my entire local repo(present only with me) to a > > shared git repo as a branch in that. > > > > I can do something like > > > > git remote add local-remote $PATH_TO_REPO_LOCATION > > git push local-remote -u master:$TREE_BRANCH > > > > But this pushes only the master. Any way to push the whole thing > > with all its branches and everything? > > What about `git push --all`? > > /M > > -- > Magnus Therning OpenPGP: 0xAB4DFBA4 > email: mag...@therning.orgjabber: mag...@therning.org > > twitter: magthe http://therning.org/magnus > > Of course I laugh at my own jokes. You can't trust strangers. > -- Phyllis Diller > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] how to push indepedent repos to individual branches in remote in git?
On Sat, Nov 28, 2015 at 06:48:35AM -0800, justrajdeep wrote: > Hi > > I want to push my entire local repo(present only with me) to a > shared git repo as a branch in that. > > I can do something like > > git remote add local-remote $PATH_TO_REPO_LOCATION > git push local-remote -u master:$TREE_BRANCH > > But this pushes only the master. Any way to push the whole thing > with all its branches and everything? What about `git push --all`? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Of course I laugh at my own jokes. You can't trust strangers. -- Phyllis Diller -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. signature.asc Description: PGP signature