I greated a repository with: git init --bare
on a server and I want to push a branch to it.
git push origin Dev
But I get
remote fatal: you are a branch waiting to be born.
What am I doing wrong?
It seems to work if I dont use --bare
, but I think thats what I should be using.
EDIT: I am only getting this is error if I have a post-recieve hook on the server. I have this in my post-recieve hook:
#!/bin/sh
GIT_WORK_TREE=/var/www/UML git checkout -f
what I want this all to do is update the webserver when I push to the remote
And my git config:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[gui]
wmstate = normal
geometry = 887x427+25+25 330 192
[branch "master"]
[branch "Dev"]
[remote "origin"]
url = ssh://mike628@192.168.2.2/GR
fetch = +refs/heads/*:refs/remotes/origin/*