git update local branches code example
Example 1: how to update remote branches list git
git remote update origin --prune
Example 2: git command to refresh remote branches
git remote update origin --prune
Example 3: git sync branches
git fetch origin
git reset --hard origin/master
git clean -f -d
#If you want to retain the changes as unstaged files, use --soft instead of --hard.
#WARNING: All your untracked files will be gone when you do git clean -f -d.