In a collaborative project, if you need to ensure that your local repository is up-to-date with the remote before pushing changes, which Git command(s) would you use?

  • git sync
  • git pull
  • git update
  • git fetch
The correct option is b) git pull. This command fetches changes from the remote repository and merges them into your local branch, ensuring that your local repository is up-to-date before pushing changes. Options a, c, and d are not standard Git commands for this purpose.
Add your answer
Loading...

Leave a comment

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