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 |
How to create tag?
In git, how would you return a commit that has just been pushed and made open?
What does a commit object contain?
Explain the gitflow workflow?
What is the function of ‘git checkout’ in git?
What is ‘git add’ is used for?
Can you explain the gitflow workflow?
What is the function of ‘git rm’?
What is subgit?
What is the function of ‘git stash apply’?
How can you create a repository in Git?
To delete a branch what is the command that is used?