Git Introduction Flashcards
This shows you the current version installed on you PC.
git –version
To set your username, type and execute these commands
git config –global user.name “YOUR_USERNAME” and git config –global user.email “YOUR_EMAIL”
To initialize project
git init
A file is in the … when all the changes made to the file have been saved in the local repo. Files in the committed stage are files ready to be pushed to the remote repo (on GitHub).
committed state
A file in the … has some changes made to it but it’s not yet saved. This means that the state of the file has been altered from its previous state in the committed state.
modified state
A file in the … means it is ready to be committed. In this state, all necessary changes have been made so the next step is to move the file to the commit state.
staged state
When we first initilize a project, it is not being tracked by git
To track the file by git
git add
If you want to add a specific file, maybe one named about.txt
git add about.txt
to know what state your file is in, you can run the … command.
git status
The next state for a file after the staged state is the …
committed state