How can you fix a broken commit?
Answer / Avdhesh P.singh
You can amend a commit (fixing it) using 'git commit --amend' and then force pushing the branch to the remote repository with 'git push --force'. Be cautious when using this command, as other developers may have already pulled or based their work on your broken commits.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you explain the gitflow workflow?
Explain the gitflow workflow?
What is the use of ‘git log’?
What is GIT version control?
What is the function of ‘git diff ’ in git?
How many heads can be created in a repository?
How do you configure a git repository to run code sanity checking tools right before making commits, and preventing them if the test fails?
What is the difference between ‘git remote’ and ‘git clone’?
Tell me the difference between head, working tree and index, in git.
What are git repository hosting services you used?
What is a “conflict” in git and how is it resolved?
How do you find a list of files that have changed in a particular commit?