Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMANDOS GIT
- git init // inicializa el repositorio
- git status // para verificar lo que vamos a subir
- git add . // para agregar los archivos
- git commit -m " " // para subir los cambios en el proyecto
- git branch -M main // para indicar que van a agregarse a la rama principal
- git remote add origin // en esta parte hay que pegar el enlace de github
- git push -u origin main // para hacer efectiva la sincronizacion con el repositorio local
- // PARA RRESOLVER ALGUNOS ERRORES
- //This sovled the issue. If you had a previous mistake in git and want to delete it then do
- rm -rf .git
- //Then do
- git init
- //To start over
- // PARA SUBIR NUEVOS ARCHIVOS A LA RAMA PRINCIPAL DEL REPOSITORIO
- Primeramente hay que hacer un git init para iniciar,
- después hay que hacer un git status para ver los archivos que aún no están agregados,
- después hay que hacer un git add y escribir el nombre del archivo que se quiere agregar sin comillas o git . si son muchos archivos
- después hay que hacer un git commit -m para informar lo que se quiere hacer entre comillas
- finalmente hay que hacer un git push -u origin main para que se termine de subir a la rama principal
- NOTA!
- a veces hay que hacer git remote add origin [ruta del repositorio].git
- despues dice que fatal
- y hay que poner git branch -M main
- y por ultimo git push -u origin main
- ----------- OTROS COMANDOS -------------
- git pull // Hace que se guarden los cambios en local que se realizan en repositorio remoto
- git tag // mas la fecha de la version del poyecto y el numero de version // -m // mas una descripcion breve entre comillas
- // esto permite agregar un tag a un proyecto parcialmente finalizado
- git push --tags // Hace efectivo el agregado de etiqueta al repositorio remoto
- git clone // mas la url del proyecto // esto sirve para clonar un repositorio remoto hacia el local
- git commit --amend // para poder editar un commit
- git pull // para modificar desde remoto a local
- ------- Para agregar una tag al proyecto ---------
- git tag [fechaversion] -m "[descripcion]"
- then
- git push --tags
- ------- Para el error error: failed to push some refs to 'https: ------
- The full syntax is:
- git pull --rebase origin main
- git push origin main
- git checkout -b <new-branch> // Para crear una nueva rama desde el repo local y cambiar a ella al instante
Add Comment
Please, Sign In to add comment