>>> "FC" == Felipe Contreras <felipe.contre...@gmail.com> writes:

> On Sun, Apr 16, 2023 at 3:01 AM Uwe Brauer <o...@mat.ucm.es> wrote:
>> 
>> >     git for-each-ref --format='git switch %(refname:lstrip=3)'
>> > refs/remotes/origin
>> 

> git-remote-hg, and I wouldn't call it a "plugin", git doesn't have
> plugins. It's just a tool.


Ok.


>> I need to do a lot of pushes from git branch to mercurial named-branches
>> like
>> 
>> git remote add hg-remote hg::../mercurial-matlab-emacs-default
>> git checkout strings
>> mygit-push-named-branch strings

> I'm not sure what's going on here, as I don't have the code of
> `mygit-push-named-branch`, but I suspect it's doing something like:

Sorry it is an alias. 
>   git push hg-remote strings:branches/strings

Precisely.


> If that's the case I think I already explained to you that you don't
> need to specify the refspec (strings:branches/strings), if the local
> branches have the same name as the remote branches, so you should
> probably name them like "branches/strings", not "strings".

> Alternatively you can configure git to always push local git branches
> to hg branches:

>     git config remote.hg-remote.push refs/heads/*:refs/heads/branches/*


Well that does not work it gives be the following error.
git: No match.

 git remote -v  

Gives 
hg-remote       hg::/home/oub/tmp/change-master/mercurial-matlab-emacs-default 
(fetch)
hg-remote       hg::/home/oub/tmp/change-master/mercurial-matlab-emacs-default 
(push)
origin  g...@gitlab.com:kalthad/matlab-emacs-default.git (fetch)
origin  g...@gitlab.com:kalthad/matlab-emacs-default.git (push)



> So when you do

>     git push hg-remote strings

> It will automatically do the equivalent of:

>     git push hg-remote strings:branches/strings

> Once you have configured git to automatically push to the right
> location, you can push all the branches with;

>     git push --all


But what's about the correct order, I mean shall I push master first
then the others, or those which (approximately) were created first?

Because I do remember in one mail you said the order which branch to
push first is somehow important, or I misunderstood you. 



-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

-- 
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/87o7noxelw.fsf%40mat.ucm.es.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to