Sync with remote Git repositories
The task's checkout drifts from the remote when someone pushes to the branch you work on, or when you commit something yourself. You can fetch or pull changes, or pull and push in one step. All three work on the branch that is currently checked out.
Check the branch state
Before you sync, check which direction the branch has drifted. The Pull and Push buttons at the top of the History tool carry the number of commits waiting on each side.
Push counts the local commits you haven't pushed yet.
Pull counts the remote commits you haven't pulled yet.
The counters are only as fresh as your last fetch.
Fetch changes
When you fetch changes from the upstream, all new data from commits that were made since you last synced with the remote repository is downloaded into the task's checkout. This new data is not integrated into the files, and changes are not applied to the code.
Since fetch does not affect the working tree, this is a safe way to get an update of all changes to a remote repository.
In the History tool, click the refresh icon at the top.
Press Ctrl+Shift+K and run Git Fetch.
Pull
If you need to get changes into the current branch from the remote tracked branch, use pull.
In the History tool, click Pull.
Press Ctrl+Shift+G Ctrl+Shift+U.
Pull and push
Git Pull & Push combines both directions in one command: it pulls the commits from the remote tracked branch into the current branch, then pushes your local commits to the remote. Use it when the branch has drifted apart on both sides.
Press Ctrl+Shift+K and run Git Pull & Push.
In the dialog that opens, confirm the push.