During a collaborative project, a team member needs to update their local repository with changes from the remote repository. Which sequence of Git commands is appropriate?

  • git pull origin master
  • git fetch origin followed by git merge origin/master
  • git push origin master
  • git clone repository-url
The correct option is b. git fetch origin followed by git merge origin/master. This sequence fetches changes from the remote repository without automatically merging them, allowing the developer to review changes before merging. git pull origin master combines git fetch and git merge in one command. git push origin master is used to push changes to the remote repository, and git clone is used to clone a repository.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *