Git Basics Flashcards
1
Q
Create an empty git repo
A
git init
2
Q
Clone repo located at onto a local machine.
Original repo can be located on the local filesystem or on a remote machine via HTTP or SSH
A
git clone
3
Q
Define author name to be used for all commits in current repo
A
git config
user.name
4
Q
Stage all changes in for the next commit.
Replace with a to change a specific file
A
git add
5
Q
Commit the staged snapshot, but instead of launching a text editor use as the commit message
A
git commit -m
“”
6
Q
List which files are staged, unstaged, and untracked
A
git status
7
Q
Display the entire commit history using the default format
A
git log
8
Q
Show unstaged changes between your index and working directory
A
git diff