Pues salio pero amigo

...
Si ejecuto
git --bare init en el dedicado, noto que toda la informacion que se crea en
.git (directorio oculto), se pone directamente en la raiz del proyecto, por lo cual, cuando estoy en mi Equipo Local, me sale este error:
Código:
shell# cd /home/git/mi_proyecto/
shell# git push miuser@miservidor.com:/home/git/mi_proyecto/
fatal: Couldn't find remote ref HEAD
fatal: The remote end hung up unexpectedly
Anteriormente salia otro error (ver post arriba), pero ahora si no se que hacer con esto :S, y ademas, si hago
pull simplemente no encuentra el HEAd tampoco.
Editado -- Vie Ene 14, 2011 9:32 am --Ya pude subir mis actualizaciones

, pero....
no se va al branch master.
Quizas el problema es que el branch
master no tiene permisos para que los remotos lo actualicen...
Pero mi solucion de momento fue entrar al servidor dedicado, crear un branch X y dejarlo existente para que cuando un Remoto suba actualizaciones, utilice ese branch, el unico [/b]problema[/b] con esta modalidad, es que el
master nunca se actualiza, es necesario entrar al Servidor Dedicado (por SSH) y actaulizarlo (
git merge X).
El proceso fue:
Servidor DedicadoCódigo:
shell# cd /home/git/
shell# mkdir proyecto // creamos proyecto
shell# git init //inicializamos SIN utilizar "--bare"
shell# git branch // vemos los branch, solo tenemos a master
* master
// creamos el branch "dev" que usare para actualizar
shell# git branch dev
shell# git branch
* master
dev
En el Servidor Local (mi equipo)Código:
shell# /home/miusuario/codigos/
shell# mkdir proyecto
shell# cd proyecto
shell# git init
shell# echo "prueba de texto" > hola.txt
shell# git add .
shell# git commit -am "estoy en Srv Local"
// subiendo al repositorio Servidor Dedicado
shell# git push diabliyo@git.miservidor.com:/home/git/proyecto dev
Ahora ya tenemos todo UP en el Servidor Dedicado, el problema es que
solo se refleja cuando entras al branch
dev, y para que master lo refleje, es necesario entrar y emerger.
Código:
// estoy en servidor Dedicado
shell# cd /home/git/proyecto
shell# git branch
* master
dev
// estoy hara que el branch "dev" actualize al branch "master"
shell# git merge dev
Y listo....
Agradeceria quien me dijera como hacerle para poder subir las cosas directo al branch
master, porque si lo intento, me dice este error:
Código:
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 479 bytes, done.
Total 5 (delta 0), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To diabliyo@git.miservidor.com:/home/git/data
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'diabliyo@git.miservidor.com:/home/git/data'