Git Flashcards
Start Git
git init
Check out what’s in the staging area
git status
Add a file to the local staging area
git add
Add all files in the the current directory to staging area
git add .
Remove a file from the staging area
git reset
Commit to git repository
git commit -m ‘Comments about what’s changed’
View history of changes
git log
Overview of history of changes
git log –summary
Add a file to a remote staging area
git add remote origin
Send a file to remote staging area and remember the parameters
git push -u origin master
Check for changes on our GitHub repository and pull down any new changes
git pull origin master
Examine changes to most recently committed file
git diff HEAD
Change files back to how they were at the last commit of a file
git checkout –
Create a new branch
git branch
Checkout a branch
git checkout