Git Flashcards
What is the command to initialize a new Git repository?
git init
What is the purpose of .gitignore?
Specifies which files and directories should be ignored (not tracked or included in version control) by git.
What does git pull do?
It pulls the latest changes from the remote repository and merges then into your local branch.
What does git fetch do?
Retrieves the latest changes from the remote repository but does not merge them into your local branch. Changes can be revived before merging.
What is the command to create a new branch?
Git checkout -b name
What is git commit?
It records changes to the repository along with a message.
What does git add do?
It tells git which changes you want to include in your next commit.
What does git log do?
It displays a list of commits in the current branch.
What does git clone do?
It creates a copy of the remote repository on your local machine
What does git status do?
Displays the statebod the working directory and staging area.
What does git revert do?
Creates a new commit that undies changes from the previous commit.
What does git branch do?
It lists, creates, or deletes branches.
What is Git?
A version control and command line tool
What does fork do?
It allows you to create two branches.
How do you create a new repository?
Github.com/new