[Prbl: pushing does not work]
Uwe Brauer
oub at mat.ucm.es
Mon Feb 1 16:24:22 UTC 2016
>>> "Simon" == Simon King <simon at simonking.org.uk> writes:
> On Mon, Feb 1, 2016 at 1:52 PM, Uwe Brauer <oub at mat.ucm.es> wrote:
>>>> "Arne" == Arne Babenhauserheide <arne_bab at web.de> writes:
> By default, git doesn't like you pushing to a repository that has a
> working copy associated with it, because the working copy is normally
> associated with a symbolic branch name, and when you push to that
> repository, you'd be advancing the branch but not updating the
> working copy.
> The normal way to avoid this is to make the git repository "bare",
> which I think is done by using the "--bare" flag to "git init" or
> "git clone".
> Hope that helps,
Thanks, it worked for my small experiment, I mentioned in my earlier
message.
But I turned now to something more serious. I cloned the auctex
development repo (which is under git), via
git clone
to a local directory (that would be my repo-bridge)
$HOME/Git/auctex
I then run
hg clone to a hg directory, namely $HOME/Git/Hg
cd $HOME/Git/Hg
hg clone $HOME/Git/auctex.
Now in that cloned hg repo, I edited some files, committed and tried to
push.
The original conf file of auctex is this.
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://git.savannah.gnu.org/auctex.git
[branch "master"]
remote = origin
merge = refs/heads/master
Now I couldn't push, but when I changed to
bare =true
I could push (to $HOME/Git/auctex) . *However* when I run
git checkout master -f
In the $HOME/Git/auctex
I obtained
fatal: This operation must be run in a work tree
So one option was to switch back to
bare =false.
In the config file.
However I found another solution which I already posted, I leave the
bare option untouched, but add
[receive]
denyCurrentBranch = ignore
That also seems to work. I would, however, appreciate comments from
people who are familiar with the git-hg plugin, in order to see that I
don't screw things up with this setting.
Uwe Brauer
More information about the Mercurial
mailing list