You are on page 1of 1

git reflog –verbose will print extra information on the screen.

- True
git bisect is used to identify a commit that has introduced a bug . - True
git reflog track the commits that are made and the commits that are discarded . -
True
Which command helps you track the revisions of your revisions in git ? - gitreflog
What is the command to pick a commit from a specific branch and move it to another
branch ? - Cherrypick (x)
I have made a commit and discarded it . I can still retrieve that commit using git
reflog. - True
What is the command to pick a commit from a specific branch and move it to another
branch ? - git move commit (x)

Use git mergetool which gives a handy interface for solving merge conflicts
Use git config merge.conflictstyle diff3 (To get a better sense of what changed on
each branch)
Use git log --merge -p <name of file> (This helps to ignore diff hunks that clearly
are not a factor in your current conflict)
Verify your changes with automated tools
Plan ahead and communicate with co-workers
If you're unsure of a merge, don't force it

Git - Common Issues

How to restore a deleted file ?

First find the commit when the file last existed: git rev-list -n 1 HEAD --
filename
Then checkout that file git checkout deletingcommitid^ -- filename
How to correct a commit message ?

If the commit hasn’t been pushed, you can do the following, which will allow you to
edit the message on the most recent commit git commit --amend

You might also like