Getting started Flashcards
1
Q
Create git repository
A
Go to folder and then
git init
2
Q
Check for changes etc
A
git status
3
Q
Add a file
Commit a change
A
git add . \ all changes
git add “file_name.txt”
git commit -m “Message here”
4
Q
View commit log
A
git log
use git help log for all the ways to view the log
5
Q
Check differences working directory
A
git diff
git diff file name
6
Q
Check differences staging directory
A
git diff –staged
7
Q
Undo a git add
A
git reset
git reset filename
8
Q
remove a file from staging
A
git rm filename
9
Q
move/rename a file
A
git mv filename newname
this will also move it if you adda path
git mv filename path/newname