Skip to content

Instantly share code, notes, and snippets.

@jansanchez
Last active December 27, 2015 10:09
Show Gist options
  • Save jansanchez/7309449 to your computer and use it in GitHub Desktop.
Save jansanchez/7309449 to your computer and use it in GitHub Desktop.
Crear un repositorio GIT y apuntarlo a una ubicacion de red

Crear un repositorio GIT y apuntarlo a una ubicacion de red

###Iniciamos un nuevo repositorio

git init --bare miProyecto.git

###Ingresar al proyecto al que le vamos a generar el bare y tipear lo siguiente:

git remote add ftpi ~/repositories-bare/miProyecto.git

###Ver la configuracion del repositorio actual

git config -e

###Pusheamos todo el repo hacia ftpi

git push ftpi --all 

###Comando para eliminar un origen remoto

git remote rm ftpi

###Clonar desde la nueva ubicacion

git clone ~/repositories-bare/miProyecto.git

###Removemos el origen remoto actual(que es la ubicacion de red)

git remote rm origin

###Agregamos el origin remoto original del proyecto

git remote add origin [email protected]:miProyecto.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment