# Sync with another branch

Pull, merge, rebase, or push using the selected target branch.

## Select the branches

The source selector shows the branch you are on. The target selector chooses the branch to compare it with. Check both selectors before a transfer. The target can differ from your configured upstream, the branch Git normally uses to track remote progress.

## Pull, merge, or rebase

Choose a remote target and click Pull to fetch that target and merge its changes into the source branch. Git's configured merge behavior applies, including fast-forward updates where enabled.

Choose a local target and click Merge to merge it into the source. Push is hidden for local targets. Hold Option to change Pull or Merge to Rebase. Rebase replays the source branch's commits onto the selected target.

If the operation stops on conflicts, follow [Resolve conflicts](https://gitlode.com/docs/resolve-conflicts). Keep the workspace open while an operation is being prepared.

## Push or publish

Click Push to send the source branch's current commit to the selected remote branch. A normal push is rejected if it would replace divergent remote history. Use the branch publication action to select a remote and name for a new remote branch. Successful publication sets its upstream.

Normal pushes include tags created in GitLode that have not been published to that destination. Normal pushes do not restore tags deleted from the remote unless you recreate them in GitLode. GitLode includes recreated tags in the next normal push.

In Repository > Tags…, select a tag marked Deleted on Remote and click Restore on Remote… to restore it explicitly. Existing local-only tags with no publication history are marked Not on Remote; click Push Tag… to publish one. Each action pushes only the selected tag.

During a normal push, GitLode checks tags it created that still point to their original objects. If an earlier tag push has an unknown outcome and the tag is missing from the push destination, GitLode stops the push. In Repository > Tags…, select the tag. Use Push Tag… to retry. Or use Delete Tag… to remove the local tag without restoring it on the remote. A missing remote tag alone does not establish that the earlier push failed.

Push also includes tag deletions queued in GitLode for the selected remote. You can push tag changes even when there are no outgoing commits. Before the push, confirm any remote tag deletions.

Cancelling a push confirmation leaves Activity unchanged. If local cleanup fails after a successful push, the push remains completed in Activity. GitLode retries cleanup before the next tag operation or push. GitLode reports repeated cleanup failures once in the operation output.

To restore a tag queued for deletion, select Undo Deletion in Repository > Tags…. Deleting a tag does not delete its commit. GitLode does not delete remote tags merely because they are missing locally.

To push a queued deletion by itself, select the tag and click Delete on Remote….

During Fetch All, GitLode does not recreate a tag while its deletion is queued for a configured remote. Deletions tied to a removed or changed remote do not prevent GitLode from fetching tags.

GitLode checks each remote tag before deleting it. If a tag has a different value on the remote, GitLode stops the push. If a local tag differs from its remote version, Delete Tag… removes only the local version. Fetch again to get the remote version.

Branch and tag changes are pushed atomically: if one update is rejected, none are applied. If a server does not support atomic pushes, push tags individually from the Tags window before pushing the branch.

Hold Option to change Push to Force Push. You must confirm remote tag deletions, but there is no separate confirmation for changes to branch history. GitLode uses an explicit force-with-lease check: the remote branch must still match the expected commit. Coordinate with other people using the branch before you force push.

The destination must have one push URL; multiple push URLs are unsupported. See [Source and target branches](https://gitlode.com/docs/source-and-target) and [Undo and recovery](https://gitlode.com/docs/undo-and-recovery).
