git update local branch from remote code example
Example 1: how to update remote branches list git
git remote update origin --prune
Example 2: git replace local branch with remote
git fetch
git reset --hard origin/{{branch}}
Example 3: git replace local branch with remote
git reset --hard origin/master
Example 4: git fetch remote branch
git checkout --track origin/branch_name
Example 5: git sync branches
git fetch origin
git reset --hard origin/master
git clean -f -d
Example 6: push local branch changes to remote branch
git push -u origin localBranch:remoteBranchToBeCreated