philyorkshire
Quiz by , created more than 1 year ago

Quick Github test based on content from CodeSchool Git Real

66
0
0
philyorkshire
Created by philyorkshire about 9 years ago
Close

Git in the command line

Question 1 of 5

1

How do you see the differences of files ONLY for the staged files?

Select one of the following:

  • git diff

  • git diff --staged

  • git diff -s

Explanation

Question 2 of 5

1

How do you roll-back the last commit and keep all the changed files locally?

Select one of the following:

  • git reset --soft HEAD^

  • git reset --hard HEAD^

  • git reset --soft HEAD^ index.html

Explanation

Question 3 of 5

1

How do you create a new branch and switch to that branch in one statement?

Select one of the following:

  • git checkout -b "cats"

  • git -b checkout cats

  • git checkout -b cats

Explanation

Question 4 of 5

1

Running 'git push origin :cats will delete the remote branch called 'cats'?

Select one of the following:

  • True
  • False

Explanation

Question 5 of 5

1

How would you set up an alias for 'git status' to 'git s'?

Select one of the following:

  • git config --global alias.s status

  • git config --global alias 'git s' 'git status'

  • git config --global alias.s 'git status'

Explanation