QuestionQ7

701.3 Source Code Management

Which statement is true about a commit in Git?

  • A A commit should not be changed after it has been uploaded to a remote repository.
  • B A commit contains information about all branches of a given repository.
  • C A commit requires all remote copies of a repository to be synchronized before completing.
  • D A commit has to be acknowledged by all remote repositories before it is completed.
  • E A commit can contain changes to the content of submodules of a repository.
Explanation

Once a commit has been pushed to a remote repository, it generally should not be changed because rewriting published history can disrupt collaborators who have based work on that commit. Git commits are completed locally and do not depend on remote synchronization or acknowledgement.

Community Discussion

No comments yet. Be the first to start the discussion!