# Git Merge Without Switching Branch ## Synopsis Local a to b (fast-forward): ```shell git fetch . a:b ``` This does not work when b is already checked out. If so, use `git merge --ff-only a` instead. Local a to b (non-fast-forward) ```shell git fetch . +a:b ``` Remote a to local b (fast-forward): ```shell git fetch origin a:b ``` Remote a to local b (non-fast-forward) ```shell git fetch origin +a:b ```