Skip to content

Instantly share code, notes, and snippets.

@marcialsoto
Last active April 15, 2020 22:04
Show Gist options
  • Select an option

  • Save marcialsoto/c6cc2c59757990e68dd2109db3c9968e to your computer and use it in GitHub Desktop.

Select an option

Save marcialsoto/c6cc2c59757990e68dd2109db3c9968e to your computer and use it in GitHub Desktop.
gitinit.md
## Instalar git
[Descargar](https://git-scm.com/downloads)
## Configurar git
```
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
```
## Agregar shh git
```
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
```
## Configurar en github
[Revisar](https://help.github.com/es/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account)
## Comandos básicos
#### Iniciar un proyecto
```
git init -y
```
#### Clonar proyecto
```
git clone <URL> <nombre>
```
#### Agregar cambios
```
git add --all
```
#### Hacer commit de cambios
```
git commit -m "Mensaje descriptivo"
```
#### Subir cambios
```
git push origin <branch>
```
#### Crear branch
```
git checkout -b <branch>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment