I faced to a situation which I don't understand. I have a remote git repo running on WebDAV / apache. Just to be sure, I logged on the server and run "chown -R wwwrun:www *" and "git update-server-info" on the relevant directory (as root, obviously).
Now, I do:
git clone http://myserver/myrepo
then:
$git remote show origin
* remote origin
Fetch URL: http://myserver/myrepo
Push URL: http://myserver/myrepo
HEAD branch: master
Remote branches:
master tracked
trunk tracked
trunk2.0 tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
and then I change any file, stage, commit and try to push, which results in:
error: remote 'refs/heads/master' is not an ancestor of
local 'refs/heads/master'.
Ob开发者_JS百科viously, any attempt to pull is pointless:
$git pull
Already up-to-date.
The repository was just fine a few days ago. How can I work with it again?
OK, so I resolved the problem as I wrote in a comment. I used one of the local repositories to make a bare remote repo and everyone else got synchronized with it.
精彩评论