What is the function of ‘git reset’?



What is the function of ‘git reset’?..

Answer / Tuba Shakeel

'git reset' allows you to undo changes in your working directory, staging area, or commit history. It can be used to move the pointer to a different commit, discard changes since that commit, or even remove commits from the repository (with `--hard` option).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

How can conflict in git resolved?

1 Answers  


What is the difference between git vs svn

1 Answers  


What does ‘hooks’ comprise of in git?

1 Answers  


In git how do you revert a commit that has already been pushed and made public?

1 Answers  


Why is it advisable to create an additional commit rather than amending an existing commit?

1 Answers  


What is a repository and how will you create it?

1 Answers  


What is the function of ‘GIT PUSH’ in GIT?

1 Answers  


What is the purpose of branching in GIT?

1 Answers  


What is a commit message?

1 Answers  


What are the different ways you can refer to a commit?

1 Answers  


What commands will you use to bring a new feature to the main branch?

1 Answers  


Explain the difference between rebase and merge?

1 Answers  


Categories