Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

GIT takes care of access control.

false

GIT is a ___ distributed version control

What is the GIT command to see all changes since the last commit?

git status

If you want to see the changes since last commit in a specific file, what
command should you use? git diff filename

What does the command git add. do? Add files to staging area

What does the following command perform? Git reset –- soft HEAD^

move commit to one before current head

What is the GIT command to skip staging and directly commit the changes
directly ? git commit -a -m “message”

What is the GIT command to blow away all changes since last commit?

git checkout filename

After performing several commits, or cloning a repository with an existing


commit history, if you want to look back to see what has happened, what
command will you use? git log

It is a good practice to use present tense in commit messages. True

What is the command to delete a branch in GIT? git branch -d branchname

What is the GIT command to create a branch? git branch branchname

What is the git command to directly create and move to a new branch?
git checkout -b branchname

What does the command git checkout branchname do? Switches from main
branch to the new branch

When I run git fetch from my local repo it will update my local code? False

What does the GIT command 'git remote prune origin' do? Cleans up all

What is the GIT command to see all the remote branches? Git branch –r

What is a good practice to follow when you want to back up a local branch?
Push to remote repo

What is the command to delete a remote branch in GIT? git push origin :
branchname

A tag in GIT context is a reference to specific commit

Final:

1. If you want to list all the changes and know who made them at what
time , what command should you use? Git who is wrong
2. What is the git command to directly create and move to a new
branch? git checkout -b branchname
3. What is the output of the following code 'git log –- pretty = oneline'?
Display one commit per line with SHA in the beginning
4. What is the command to delete a remote branch in GIT? git push origin :
branchname
5. What is the GIT command to create a branch? Git branch branch
name
6. What is the command to delete a branch in GIT? git branch -d
branchname
7. If you want to see the changes since last commit in a specific file,
what command should you use? Git diff filename
8. After performing several commits, or cloning a repository with an
existing commit history, if you want to look back to see what has
happened, what command will you use? Git log
9. It is a good practice to include log files inside a repository. false
10. What does the command git checkout branchname do?
Switches from main branch to new branch

You might also like