git config user.name <username> |
set name associated with commits |
git config user.email <email> |
set email associated with commits |
git init |
track file(s) within a folder |
git clone <repository url> |
create local copy of remote repository |
git add |
include file(s) in next commit |
git commit -m <"message"> |
take snapshot of changes to file(s) |
git status |
check status of file(s) |
git log |
view commit history |
git diff |
view unstaged changes |
git remote add <name> <url> |
connect local repository to remote repository |
git fetch <remote> <branch> |
retrieve changes from remote branch |
git pull <remote> |
retrieve commits from a remote repository to local repository |
git push <remote> <branch> |
send commits in local repository to remote repository |
git revert <commit> |
create new commit that undoes changes made in previous commit |
git reset <file> |
remove file from staging area |
git branch |
create new branch |
git checkout –b <branch> |
switch to new branch |
git merge <branch> |
merge branch into current branch |