Commit, Push, and Pull a repository on SourceTree
This article should help users to understand how to run basic Git operations such as commit, push, pull via SourceTree.
How to commit files on Sourcetree
- Click on the "Commit" button on the toolbar.
- On the 'Unstaged files' window, every unstaged changes will appear here. Select files to stage before committing
- Here's the 'Staged' files window, staged files will appear here. To unstage a file again, just check the checkbox next to the staged file and the file will be back in unstaged mode.
- Enter a commit message here.
- Click "Commit" to commit all staged changes to the repository.
Push changes on local repository to remote repository on Sourcetree
- Click on the "Push" button on the toolbar. A Push window should appear.
- Select the remote to push to.
- Check the branches which need to be pushed to the remote repository.
- Check here to push all tags as well.
- Click "OK" to push changes to your remote repository.
Pull changes from remote repository to local repository on Sourcetree
- Click on the "Pull" button on the toolbar. A Pull window should appear.
- Select the remote to pull from.
- Select the remote branch to pull changes from.
- Click "OK" to pull changes from your remote repository into your local working directory.