This document provides an overview of common Git commands used for:
1. Creating and cloning repositories, checking out branches, viewing commit histories and diffs. Commands include git init, git clone, git branch, git checkout, git log, git diff.
2. Making changes to code and committing updates to the local repository. Commands include git add, git commit, git reset.
3. Synchronizing local changes with remote repositories. Commands include git pull, git fetch, git push to get latest changes and share local commits.
This document provides an overview of common Git commands used for:
1. Creating and cloning repositories, checking out branches, viewing commit histories and diffs. Commands include git init, git clone, git branch, git checkout, git log, git diff.
2. Making changes to code and committing updates to the local repository. Commands include git add, git commit, git reset.
3. Synchronizing local changes with remote repositories. Commands include git pull, git fetch, git push to get latest changes and share local commits.
This document provides an overview of common Git commands used for:
1. Creating and cloning repositories, checking out branches, viewing commit histories and diffs. Commands include git init, git clone, git branch, git checkout, git log, git diff.
2. Making changes to code and committing updates to the local repository. Commands include git add, git commit, git reset.
3. Synchronizing local changes with remote repositories. Commands include git pull, git fetch, git push to get latest changes and share local commits.
This document provides an overview of common Git commands used for:
1. Creating and cloning repositories, checking out branches, viewing commit histories and diffs. Commands include git init, git clone, git branch, git checkout, git log, git diff.
2. Making changes to code and committing updates to the local repository. Commands include git add, git commit, git reset.
3. Synchronizing local changes with remote repositories. Commands include git pull, git fetch, git push to get latest changes and share local commits.
GIT = distributed version control system $ git clone ssh://user@domain.com/repo.
git used to point to an exis
CREAR REPO BRANCH I $ git init [proyecto] B $ git branch C creates a new Git repository list all local branch B $ git branch -av A local branch and remote
C $ git checkout branch R
MIRAR REPO switches to specified branch S $ git status C $ git checkout file R Discard local changes in a specific file L $ git log M $ git merge branch C show full change history combine two branch
D $ git diff joins two or more development histories together B
takes two input data sets and outputs the changes between them S $ git show T $ git tag [name] T view expanded details on Git objects tag current commit R $ git reset -- hard HEAD~1 reset all last commit used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location CHANGES SINCRONIZAR $ git commit - m P $ git pull commit all staged to local repository get latest changes from origin NO MERGE $ git add . F $ git fetch <remote> promote pending changes from the working Download all changes from <remote>, but don‘t directory to the staging area. integrate into HEAD $ git reset P $ git push unstages files keeping the changes push local changes to origin $ git reset -hard P $ git pull -- rebase revert all to last commit fetch latest changes from origin and rebase $ git cherry-pick P $ git pull -f picking a commit from a branch and reapplies commits on top of another base applying it to another branch $ git branch -d <branch> MERGE vs REBASE Delete a local branch merge preserves history as it happened, rebase rewrites it $ git tag <tag-name> Mark the current commit with a tag