Font size
WorksheetsGit basics
Total questions: 10
Worksheet time: 7mins
Which of these terms best describes git?
Integrated development environment
Issue tracking system
Distributed Version control system
Web-based repository hosting service
Which command allows me to view my repository's history?
git commits
git log
git commit --history
git history
What is the "staging area"?
It is the current area of work, with the files of the project
It is the content of the .git/ directory, with the information collected by git
It is current position in the history log for the current branch
It is the set of files that will form part of the next commit
How can I add a file to the staging area?
git add file.txt
git commit file.txt
Which is the correct order to submit your changes from the working directory to the remote repository?
git add, git push, git commit
git add, git commit, git push
git push, git add, git commit
git commit, git add, git push
Github and Gitlab are simply a "Git-as-a-service"
True
False
I interactively rebased "main" branch on my computer and changed commits order. Can I safely force push on the remote?
Yes
No
Which of the following commands will result in the changes of "some" branch being included into "another" branch?
(multiple choices allowed)
git checkout some;
git merge another;
git checkout another;
git merge some;
git checkout another;
git rebase some
git checkout another;
git rebase -i some
Which of the following propositions are NOT true about Git?
(multiple choices allowed)
It can help me to be more efficient
It prevents bugs and regressions in the codebase
It helps me to work with my colleagues
It allows to get back to a previous state of the codebase
I'm working on a local branch, 'foo', based on develop since a few days. A colleague just pushed on develop a bug fix that I need within my own branch 'foo'. What can I do (assuming I'm currently on 'foo')?
(multiple choices allowed)
git pull;
git fetch; git rebase origin/develop;
git merge develop;
git rebase develop;
