• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/22

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

22 Cards in this Set

  • Front
  • Back

In the Git CLI, how to you set up your name and email?

git config --global user.name 'Michael Kramps'


git config --global user.email 'mdk989@gmail.com'

How do you enable git within a directory?

Navigate to the directory and type: git init

Should you work on your project in the master branch?

No. You should work on your project in a separate branch and merge finished updates to the master branch.

What command lets you view information about the state of git in a directory?

git status




This command is basically the git command for getting help

How would you add untrackedFile.xml to the git staging area?

git add untrackedFile.xml

How could you remove a file from the git staging area?

git rm --cached fileName.xml

How would you check if test.txt has any differences from HEAD commit or the staging area?

git diff test.txt

How can you permanently store changes from the staging area into the git repository?

git commit

What command lets you view previous commits for your project?

git log

What does git call the most recent commit in your working directory?

HEAD

How would you display information about your most recent commit?

git show HEAD

How would you revert your working copy of test.txt back to the most recent commit?

git checkout HEAD test.txt

How would you remove testFile.xml from the staging area

git reset testFile.xml

Simply put, what does git reset do?

git reset sets your project HEAD to the specified state.

How do you check what branch you are on?

git branch

How do you create a new branch?

git branch newBranchName

How do you switch to a different branch?

git checkout branchName

What does git merge do?

git merge takes an argument of a branch name, that branch is then pulled into the branch you currently have checked out and its changes are added.

How do you fix a merge conflict?

You must go to the file where the conflict exists and choose the version(s) you want to keep, then you must commit the file again to the branch.

How do you delete a branch?

git branch -d branchName

How do you view the remote repositories associated with a given project?

git remote -v

What does git fetch do?

git fetch reaches out to the remote repository associated with your project and pulls in any changes into a special branch called a remote branch.