> On Sun, Apr 16, 2023 at 2:31 PM Uwe Brauer <[email protected]> wrote:
> You cannot push a branch you don't have. Obviously.
> But you can create the branches without checking them out, as I
> already explained:
> git for-each-ref --format='git switch %(refname:lstrip=3)'
> refs/remotes/origin
Ah, right. Into my HOWTO file *now*.
But after using the command I obtain
git switch HEAD
git switch copyright
git switch default
git switch documentation
git switch fontlockhang
git switch hairyblocks
git switch mac_init
git switch modernize
git switch shellcomplete
git switch strings
git switch usage1
git switch wisent-parser
Git branch -a still
Shows
default
* modernize
remotes/hg-remote/branches/default
remotes/hg-remote/branches/modernize
remotes/origin/HEAD -> origin/default
remotes/origin/copyright
remotes/origin/default
remotes/origin/documentation
remotes/origin/fontlockhang
remotes/origin/hairyblocks
remotes/origin/mac_init
remotes/origin/modernize
remotes/origin/shellcomplete
remotes/origin/strings
remotes/origin/usage1
remotes/origin/wisent-parser
error: src refspec mac_init does not match any
error: failed to push some refs to
'hg::/home/oub/Push-test/mercurial-matlab-emacs-default'
> git push hg-remote remotes/origin/modernize:modernize
Well
git push hg-remote remotes/origin/modernize:mac_init
error: The destination you provided is not a full refname (i.e.,
starting with "refs/"). We tried to guess what you meant by:
- Looking for a ref that matches 'mac_init' on the remote side.
- Checking if the <src> being pushed ('refs/remotes/origin/modernize')
is a ref in "refs/{heads,tags}/". If so we add a corresponding
refs/{heads,tags}/ prefix on the remote side.
Neither worked, so we gave up. You must fully qualify the ref.
hint: The <src> part of the refspec is a commit object.
hint: Did you mean to create a new branch by pushing to
hint: 'refs/remotes/origin/modernize:refs/heads/mac_init'?
error: failed to push some refs to
'hg::/home/oub/Push-test/mercurial-matlab-emacs-default'
> It's not clear what would be the best thing to do here because you
> haven't explained your use-case.
In the foreseeable feature, matlab-emacs should be moved to
github/gitlab and I thought of dealing it with your script (BTW I said
plugin because hg-git calls itself plugin, but since hg is written in
python that makes sense).
So I have to clone the repository (from gitlab/github and then use your
script, while using the mirror option would be possible, it think the
solution with for-each-ref is what I need)
> Normally people push their branches, that they have in the their repos.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/87cz43uj1y.fsf%40mat.ucm.es.
smime.p7s
Description: S/MIME cryptographic signature
