Laura-TM / Git-CLI-Coursework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git CLI Quiz

Remember, you must submit this quiz using ONLY Git on the Command Line.

You CANNOT open Github Desktop.


  1. What is a benefit of using the Git CLI rather than a GUI?

GUI appears to be easier and faster to learn than CLI, although CLI provides more flexibility of use and greater velocity when carrying out tasks. GUI can operate various tasks as the same time better than CLI, but cannot generate the shortcuts that CLI can.

  1. What is the Git command to send your code to Github?

First, you could check the available places you could send the code to by using "git remote -v".

On occasions, it might ask you to enter your username and password (but it shouldn't happen often).

Secondly, to place all changes / files to the staging area, you do "git add" and then, you do "git commit -m + your message within speech marks".

Finally, you would enter "git push" (or "git push origin master" -assuming that is the correct place).

  1. What does the -m in a Git commit command mean or do?

When you are committing a change, you do "git commit -m plus your message in speech marks. By using -m, you are telling the system that the next part is a message, a comment that goes with your commit.

  1. What is the Git command for making a commit?

When you are ready to commit, you enter "git commit" (usually with -m to add a comment).

  1. What is the Git command to select the files you want to add to a commit?

There are two different ways: "git add + file-name" (to add one or a few by name) or "git add ." (to add all the avaiable files).

  1. What is the Git command to see changes you have waiting to be committed?

You can do "git status" to see if anything has been changed, moved, etc.

  1. What is the Git command to get changes from Github onto your computer?

Usually you would do “git pull origin master” (depending on the branch you are working on), some developers just do "git pull".

About