Search code examples
gitclone

how to update git clone?


I have a clone of a branch from git repo. I made changes commited and pushed to remote branch. Now I want to update my clone to remote branch, so that changes made by anybody else should appear in my clone. How to do that ? Thanks


Solution

  • git pull will retrieve remote modification and merge it to your worktree.

    If you only want to view remote changes,

    git fetch

    will retrieve remote changes to local, and you can refer it by origin/branch_name.