From https://www.educative.io/ Flashcards
How do you know which git repo is the main source?
All git repos are the same.
There is no concept no a central server that hold the “golden” source.
Instead, we maintain our own source. A server or host may be in charge but fundamentally they are all the same.
What are the 4 phases a file tracked by git will go through?
This image is missing some arrows, what are they?

Make cards for overall workflow for:
installing
Connecting
backing up
pushing
pulling
starting new
etc
What does git status do?
Displays the state of the repo and staging area
Gives info on whether a file has been changed or staged
What does git log do?
gives a log of commits
can use –graph to see branching
use –all to see all branches
Add and commit changes in one message (only for already tracked files)
git commit -a
What happens if you do and do not use the -m with a commit?
With, looks for a message within quotation marks
without it opens nano and you can type the message there
See the specific changes (not just whether a file has changed)
git diff
Clone a repo from the harddrive
Clone a repo from github
git clone folderName targetfoldername (don’t git init first)
git clone https://github.com/ianmiell/shutit (don’t git init first)
What does git reset do?
What flag does it use by default
unstages files
–mixed
What does git reset –hard do?
Reverts files on your computer to the last commit
Revert files on your computer to the last commit
git reset –hard
unstage a single file
unstage all files
git reset filenameanddirectory
git reset –mixed
View log but only the title
git log –oneline
view branching log
git log –graph
create a new branch at head
git branch branchname
show all branch names
git branch
view all branches in log
git log –graph –all
The head can point to branch tag but not to arbitrary commits
t or f
f
it can point to arbitrary commits as a floating head
A branch is the same as a tag
t or f
f
branches also have a history
tags do not
but are otherwise the same
View all tags
git tag
create a tag where the head is
create a tag somewhere else
git tag tagname
git tag tagname pointername (works with 6e3574ba4ff1b53dcbf776c6613037b156bc2e30)
A branch is just a pointer
t or f
A tag is just a pointer
t or f
T
Tags and branches can both maintain a branch as logged in git log
t or f
t
tags do it too apparently