Giter Club home page Giter Club logo

comandos-git's Introduction

Git Commands and Terminal / Comandos de GIT y Terminal

A list of commonly used Git and Terminal commands

Una pequeña lista de los comandos mas utilizados en Git y la Terminal

--

Terminal Commands / Comandos de la Terminal

Command Description Descripción
cd [rute] To change directory Cambia el directorio
mkdir [name] Make directory Crea una nueva carpeta
ls -a List information about the files Lista los archivos del directorio
clear clear the terminal screen Limpia la Terminal
Touch [name.txt] create a empty file Crea un archivo vacio
rm [file] remove files Elimina un archivo
rm -rf [dir] remove directories Elimina una carpeta
pwd Print name of current/working directory Muestra el directorio donde nos encontramos
mv move (rename) files Mueve o renombra archivos
cat [name.txt] Concatenate files and print on the standard output Vista previa del contenido del archivo
sudo execute a command as another user Ejecuta un commando como administrador

Config Git / Configuracion de Git

Command Description Descripción
git config --global user.name "name-example" Add a user name Añade un nombre de usuario
git config --global user.email [email protected] Add a email for user Añade un correo del usuario
git config --list List all setings Muestra todas las configuraciones

Config SSH Keys / Configuracion de Credenciales SSH

Command Description Descripción
ssh-keygen -t rsa -b 4096 -C "Email" Generate SSH key Generar credencial SSH
eval $(ssh-agent -s) Verify ssh agent Verifica la existencia del servidor de credenciales SSH
ssh-add [rute] Add SSH key to your workspace Agrega la credencial SSH al entorno de trabajo

Creating Projects / Creacion de proyectos

Command Description Descripción
git init Initialize a local Git repository Inicia un repositorio local de Git
git clone [url] Create a local copy of a remote repository Crea una copia local de un repositorio remoto

Basic Snapshotting / Snapshooting Basico

Command Description Descripción
git status Check status Verifica el estatus del repositorio
git add [file-name.txt] Add a file to the staging area Añade un archivo al area de preparación
git add . Add all new and changed files to the staging area Añade todos los archivos al area de preparación
git commit -m "[commit message]" Commit changes Añade los archivos al repositorio
git commit -am "[commit message]" Add changed files and commit Añande los cambios y hace commit
git rm -r [file-name.txt] Remove a file (or folder) Elimina archivos o carpetas
git commit --ammend Ammend the last commit Agrega los cambios al ultimo commit en caso de error

Branching & Merging / Ramas y fusionar

Command Description Descripción
git branch List branches (the asterisk denotes the current branch) Lista todas las ramas
git branch -a List all branches (local and remote) Lista todas las ramas locales y remotas
git branch [branch name] Create a new branch Crea una nueva rama
git branch -d [branch name] Delete a branch Elimina una rama
git show-branch --all List all branches local Lista todas las ramas en local
git push origin --delete [branch name] Delete a remote branch Elimina una rama remota
git checkout -b [branch name] Create a new branch and switch to it Crea una nueva rama y cambia a ella
git checkout -b [branch name] origin/[branch name] Clone a remote branch and switch to it Clona una rama remota y cambia a ella
git checkout [branch name] Switch to a branch Cambiar a una rama determinada
git checkout - Switch to the branch last checked out Cambia a la ultima rama seleccionada
git checkout -- [file-name.txt] Discard changes to a file Descarta los cambios de un archivo
git merge [branch name] Merge a branch into the active branch Fusiona una rama a la rama activa
git merge [source branch] [target branch] Merge a branch into a target branch Fusiona una rama a una rama determinada
git stash Stash changes in a dirty working directory
git stash clear Remove all stashed entries

Sharing & Updating Projects / Compartiendo y Repositorios Remotos

Command Description Descripción
git push origin [branch name] Push a branch to your remote repository Envia el repositorio local a remoto
git push origin --delete [branch name] Delete a remote branch Elimina un repositorio remoto
git pull Update local repository to the newest commit
git pull origin [branch name] Pull changes from remote repository Hace un feth y fusiona
git remote add origin ssh://[email protected]/[username]/[repository-name].git Add a remote repository Crea un repositorio remoto
fork Copy a external repository Copa un repositorio externo
git remote -v list remote connections Lista las conexiones remotas
git remote set-url [branch name] [url] Change the url Cambia la url del repositorio

Inspection & Comparison / Inspeccion y Comparacion

Command Description Descripción
git log View changes Muestra los cambios en el repositorio
git log --summary View changes (detailed) Muestra los cambios en el repositorio detalladamente
git log -all --graph --decorate --oneline View changes (Max-detailed) Muestra todos los cambios del repositorio detallada y graficamente
git diff [source branch] [target branch] Preview changes before merging Compara los diferentes cambios

Others / Otros

Command Description Descripción
alias [name=] "command" Create a shorcut for a command Crea un alias para llamar a un comando
git tag -a [name] -m "message" [id/hashtag] Create a tag for a commit Crea un tag de un commit en especifico
git show-ref --tags List all tags Lista los tags existentes
git push --tags Push tags to your repository Envia los tags al repositorio remoto
git tag -d [name] Delete a tag Elimina un tag en especifico
git push origin :refs/tags/[name] Delete a tag from GitHub Elimina un tag dentro de GitHub
gitk Open GUI Abre una interfaz grafica
git cherry.pick [id] Take commit from other branches Trae un commit especifico desde otra rama
git grep -n [word] Search words in the proyect Busca la palabra especificada en todo el proyecto

comandos-git's People

Contributors

guajardo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.