-
What is contained in a commit?
-
What are the 3 areas in Git?
- Staged
- It's Complicated
- Untracked
- Repo or History
- Backstage
- Frozen
- Working Directory
-
What commands or actions move a file to different Areas of a repository?
-
Can a file be staged and modified at the same time? How?
-
What is the difference between fork and clone?
-
What are some common log output modifiers and what do they do?
-
How would you list all merged branches in a git repo?
-
git branch -m
-
git branch --not-not-merged
-
git branch --no-merged
-
git branch --merged
-
-
Can you delete an unmerged branch?
- Yes
- No
- Yes but you have to use -D
-
What is HEAD?
-
Given a stash with 3 items how would you apply the 2nd item in the stash to your repo?
-
git stash apply the second one
-
git stash pop pop
-
git stash drop pop
-
git stash apply stash@{2}
-
-
What tag data is added with an annotated tag?
- Tag message
- Tagger
- Tag Committer
- Tag Date
- Tag count
- Tag Parent
-
How would you get a count per file of the phrase 'lodash' in a repo?
-
How would you amend the most recent commit?
-
Why should you only rebase local commits that have not been shared?
-
How would you start an interactive rebase
-
What are some different modifiers in an interactive rebase?
-
Explain the difference between a recursive merge and a fast-forward merge?
-
What happens if you run the command 'git reset --hard HEAD'
-
Command to compare your local changes or differences before pushing your commit(s) to master on the remote
-
Command to log or show commits in a branch feature1 that are not in the master branch
-
Command to log or show unique commits in both branch feature1 and the master branch
-
Command to clean up or delete a merged local branch named feature1
-
Check areas that would be effected by the following commands
Command | Working Directory | Staing |
---|---|---|
git reset file1.txt |
[ ] | [ ] |
git reset --hard file1.txt |
[ ] | [ ] |
git checkout -- file1.txt |
[ ] | [ ] |
git reset file1.txt |
[ ] | [ ] |
git reset --hard file1.txt |
[ ] | [ ] |
git checkout -- file1.txt |
[ ] | [ ] |