Git Flashcards
1
Q
Initialize new repository
A
git init
2
Q
Get a copy of a repository from github etc..
A
fork and copy link.
git clone
3
Q
create a new branch and switch to it
A
git checkout -b “new branch name”
4
Q
List recent changes
A
git log
5
Q
Check for changed files
A
git status
6
Q
Stage files
A
git add .
git add “filename”
7
Q
commit files with message
A
git commit -m “message”
8
Q
push to remote repository
A
git push origin master
9
Q
Switch to other branch
A
git checkout “branchname”