Test
Git self assesment Quiz
Crea una cuenta gratis para terminar este test
Guarda tu progreso y consulta tu resultado final.
¿Ya tienes cuenta? Inicia sesión
Preguntas del test (16)
1How can someone convert a normal folder with name my_project into a local git repository?
- AGit merge my_project
- BGit remote add origin my_project
- CGit init
- DGit push origin my_project
2When someone clones a remote repository to his computer, this automatically gives him the access to change the code to the files in his computer and to push his code back to remote again.
- AVerdadero
- BFalso
3What is the ultimate prerequisite for someone in order to perform a commit?
- AHaving the file changes stashed.
- BHaving just changed some files.
- CHaving the changed file also staged.
4Select the correct order of the actions , that have to be made if someone wants to send his code to remote from the beginning.
- A1. Make some file changes
2. Commit them
3. Stage them
4. Push - B1. Make file changes
2. Stage them
3. Commit them
4. Pull - C1. Make file changes
2. Stage them
3. Commit them
4. Push
- A1. Make some file changes
5You created a branch from master and you have been working on it tirelessly. You have already made some changes but you havn't staged them.
Suddenly a colleague of yours says to you that he has updated the master branch on remote and you must downloaded the latest changes.
How are you going to save your file changes on your current branch without performing a commit, in order to fetch the new code from master?- AGit add --all
- BGit commit -m 'some changes'
- CGit push origin branch
- DGit stash
6You have made a commit with some awesome changes and you pushed to remote. Unfortunately you have forgotten to add one small change to your previous commit. What should you do?
- AAfter the changes, make a new commit, then push.
- BFill the previous commit and add new changes there by typing *Git commit --amend*
7A colleague of your has updated the master branch while you were working on your branch locally. You have already brought these changes to your local master and you want to have them to your local branch as well regardless of commit order.
What seems correct? Your branch's name is jake.- A1. Git checkout master
2. Git merge jake - B1. Git checkout jake
2. Git merge master - C1. Git checkout master
2. Git rebase jake - D1. Git checkout jake
2. Git rebase master
- A1. Git checkout master
8When someone creates a local branch, that means that a corresponding branch is being automatically created on remote.
- AVerdadero
- BFalso
9You have been working on your local branch and now you are ready to introduce these commits to your local master. What is the appropriate command given that you are standing on master now and given the name of your branch is jake.
- AGit push jake
- BGit push origin master
- CGit merge origin master
- DGit merge jake
10What is the appropriate action to get out of the merge process right after you have solved merge conflicts in text editor?
- A1. Git add --all
2. Git commit -m 'some message about the merge' - B1. Git commit -m 'some message about the merge'
- C1. Git stash
2. Git commit -m 'some message about the merge' - DGit push --force
- A1. Git add --all
11What is the difference between merge and rebase?
- ARebase is a better option because you can pick a specific commit from another branch or from past and put it on top of your branch.
- BRebase brings all commits from master branch and puts them on top of your branch's commits.
- CRebase brings all commits from the specified branch but keeps the commits of your branch on top of them.
- DRebase brings all the commits from the remote master but keep yours on top.
12How do you discard changes that you accidentally made in a file that is currently unstaged? The file is example.scss
The commit that you are currently is eb4c29u.- AGit reset HEAD example.scss
- BGit revert HEAD
- CGit checkout eb4c29u
- DGit checkout -- example.scss
- EGit checkout example.scss
13How to unstage a file that i have accidentally staged?
- AGit checkout example.scss
- BGit reset --hard example.scss
- CGit reset HEAD example.scss
- DGit checkout HEAD
14How can someone discard the last commit and return to previous one without deleting anything?
The commit hash is eb49uf2- AGit reset --hard eb49uf2
- BGit checkout eb49uf2
- CGit revert HEAD
- DGit cherry-pick eb49uf2
15What is the appropriate action if someone wants to go back to the commit with hash eb49uf2 safely without deleting all the in-between commits?
- AGit checkout eb49uf2
- BGit revert eb49uf2
- CGit merge eb49uf2
- DGit reset --hard eb49uf2
1616. What does *Git cherry-pick* command do?
- ATo fetch all the code from a specific branch to your branch by putting the other branche's commits on top of your own.
- BTo fetch all the code from a specific branch to your branch by putting your branche's commits on top of the others.
- CTo bring a specific commit from different branch. This commit will go on top of your commits.
- DTo bring a specific commit from different branch. This commit comes, but your branche's commits remain on top.
Información
- Descripción
- A 16 Questions basic self-assessment test regarding git and github workflow. Thus the participants can estimate how good they have proceeded with git, how further they need to go. Also for the teacher is a good tool for solving the commonest misconceptions on the spot.
- Autor
- Kostas Diakogiannis
- Idioma
- English
- Visitas
- 219
- Etiquetas
- Valoración
- Aún sin valoraciones Valora este test