GIT Flashcards
Working with Git hub and Cheat Sheets
Set the name that will be attached to your commits and tags.
git config –global user.name “Your Name”
Set the e-mail address that will be attached to your commits and tags.
git config –global user.email “you@example. com”
Create a new local repository in the current directory.
git init [project name]
Downloads a project with the entire history from the remote repository.
git clone <project></project>
Displays the status of your working directory. Options include new, staged, and modified files. I
git status
Add a file to the staging area. Use. in place of the full file path to add all changed files from the current directory down into the directory tree.
git add [file]
or
git add .
git commit
Create a new commit from changes added to the staging area. The commit must have a message!
Add a file to the staging area. Use. in place of the full file path to add all changed files from the current directory down into the directory tree.
git add [file]
Show changes between working directory and staging area.
git diff [file]
Shows any changes between the staging area and the repository.
git diff –staged [file]
Discard changes in working directory. This operation is unrecoverable.
git checkout – [file]
Revert some paths in the index (or the whole index) to their state in HEAD.
git reset {<path>...]</path>
Remove file from working directory and staging area.
git rm [file]