Git and GitHub Flashcards
What is the power of Git?
Version control, it allows us to keep track of the changes that have been made to our projects, to roll back to previous versions and current versions, and to add new features to our projects without have to change its current status.
What are the only two configuration values after you have installed git?
git config –global user.name “Your Name”
git config –global user.email your_name@example.com
to confirm: git config –global –list
What is the color coded output config?
git config –global color.ui “auto”
git init
initialize the repository
git add
add all the files that were changed since the last back up to the staging area
git status
shows you all the files that were changed since the last backup and which ones are already added to the staging area
git commit -m ‘…’
commits the changes to the repository
git checkout ____
switches to the branch name provided in your git repository. This will create a new branch if the name provided doesn’t exist.
git branch
shows all of your git branches and marks the one you are currently on
git log
shows all the backups created in the repository
git blame ___
shows who wrote which line of code or in other words who is to be blamed for that particular line of code
git remote add origin ___
tells git to add a remote place called ‘origin’ to a remote URL ____
git push
pushes the changes in your local repository to the remote repository
git pull
pulls the changes in a remote repository to your own local repository
git clone ___
clones a remote repository in ___ to your own local folder