Uso basico de herramientas git y uso de comando en la terminal.

Sebastian Velez Zuluaga
2 min readMay 31, 2019

Maneras de usar git.

En windows uso tortoise SVNy git

  1. Instalar git . Sirve para clonar los repositorios al pc, tambien tiene un termina propia donde se pueden ejecutar comandos.

https://gitforwindows.org

2. Instalar TortoiseSVn. Sirve para agregar los archivos al repositorio, crear ramas, resolver conflictos

https://tortoisesvn.net/downloads.html

En MacOs sourcetree.

3. Instalar Sourcetree. Sirva para clonar repsositorios y ejecutar los comando de manera grafica.

https://www.sourcetreeapp.com

En Terminal los comandos basicos son :

4. Para Agregar un nuevo repo. ir a la carpeta donde estan los archivos que se quieren subir :

git init
git add.
git commit -m “first commit”
git remote add origin <URL del repositorio https://>
git push -u origin master

5. Para hacer cambios.

git status
git add.
git commit -m “”
git push -u origin master

6. Para clonar,

git clone <URL del repositorio https://>

7. Para cambiar de rama

git branch -a
:q
git checkout nombre rama

8 . Crear una nueva rama

$ git pull
$ git checkout -b [name_of_your_new_branch]
$ git push origin [name_of_your_new_branch]

9. Limpiar el repo, con esto se consigue que el repo quede actualizado en el ultimo commit.

$ git reset — — hard
$ git fetch origin [name_of_branch]
$ git reset — — hard FETCH_HEAD

10. limpiar localmente el repo

git clean -f -d

11. Para devolverse a un commit en particular se debe usar

$ git checkout [ID del commit]

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response