On Mon, Apr 17, 2023 at 3:05 PM Uwe Brauer <o...@mat.ucm.es> wrote:
>
> > On Mon, Apr 17, 2023 at 1:19 AM Uwe Brauer <o...@mat.ucm.es> wrote:
>
> > Those are *suggestions* of what you should run. It doesn't do
> > anything, and obviously you shouldn't do `git switch HEAD`.
>
> > The error message is pretty much telling you what to do:
>
> >   git push hg-remote remotes/origin/modernize:refs/heads/modernize
>
> > Why didn't you try that?
>
>  I did, but the commits where pushed as bookmarks not as named-branches

     git push hg-remote remotes/origin/modernize:refs/heads/braces/modernize

> I thought
> git config remote.hg-remote.push 'refs/heads/*:refs/heads/branches/*'
>
> Would have the effect that I don't need to run
>
> git push hg-remote  
> remotes/origin/hairyblocks:refs/heads/hairyblocks:branches/hairyblocks

Only if you don't specify the refspec, which is the typical way to push.

    git push hg-remote hairyblocks

That would be translated to a refspec:

    git push hg-remote refs/heads/hairyblocks:refs/heads/branches/hairyblocks

But if you are already specifying the refspec, nothing gets translated.

> Or whatever it is.
>
> I am deeply confused.
>
> I understood the first (cumbersome) method
>
>     1. Set up remote: git remote add hg-remote 
> hg::../mercurial-matlab-emacs-default/
>
>     2. Checkout each remote branch
>
>     3. Run, for example git push default:/branches/default
>
> So I thought running
> git config remote.hg-remote.push 'refs/heads/*:refs/heads/branches/*'
>
> Would shorten
> the command
>
> git push default:/branches/default
>
> To
>
> git push default

It does, but you haven't created the local branches, soyou can't do
`git push foo`, if "foo" doesn't exist.

> If I checkout each branch and push them then everything seems find but
> suppose I had 100 branches, I need to checkout each, well....

But you are going to need to do that only once.

> > But you can clone it once, set up all the branches once, push all the
> > branches ini order once, and forget about that step.
>
> > After that you can just pull from one repo and push to another.

-- 
Felipe Contreras

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CAMP44s0GJf2z4mCyGsoBnDRA9E4VFctPCcDCUFYCSNC%2BfTQHwA%40mail.gmail.com.

Reply via email to