Sync a Repository¶
Overview¶
Update your local repository and send your changes to the remote repository.
Before you begin¶
Make sure:
- you have cloned the repository
(see: Clone a repository) - you are inside the repository directory
- you have permission to update the repository
Steps¶
1. Open a terminal¶
Open a terminal on your local machine.
2. Navigate to the repository¶
3. Check repository status¶
4. Get latest changes¶
5. Add your changes¶
To add all changes:
6. Commit your changes¶
Replace <commit-message> with a short description of your change.
7. Send changes to the repository¶
Verify¶
Check that:
- your changes are committed:
- your branch is up to date:
Troubleshooting¶
Nothing to commit¶
Possible causes:
- no changes were made
- changes were not added
Check:
Push rejected¶
Possible causes:
- remote repository has new changes
- you need to pull before pushing
Run:
then retry:
Authentication failed¶
Possible causes:
- incorrect credentials
- authentication method not configured