From Git v1.7.8 to v1.8.5.6, you can use this:
git fetch <remote> --prune --tags
with all Git version since v1.7.8, you can use the following command:
git fetch --prune <remote> +refs/tags/*:refs/tags/*
You may need to enclose the tags part with quotes (on Windows for example) to avoid wildcard expansion:
git fetch --prune <remote> "+refs/tags/*:refs/tags/*"
NOTE: in all these cases would be likely be "origin" or whichever remote you might usually reference.
To update the local list of remote branches:
git remote update origin --prune
This will clear the references of unexistents branchs of remote.
As long as you're doing a fast-forward merge, then you can simply use
git fetch <remote> <sourceBranch>:<destinationBranch>
You cannot merge a branch B into branch A without checking out A first if it would result in a non-fast-forward merge. This is because a working copy is needed to resolve any potential conflicts.
Example:
git fetch . master
To overwrite your work in your branch and take their work, you should make:
git merge --strategy=recursive -X theirs {remote/branch} --> example:origin/master
If solution is to accept local/our version, run:
git checkout --ours PATH/FILE
If solution is to accept remote/other-branch version, run:
git checkout --theirs PATH/FILE