Submit (Push) to remote repository:
1. Work work work... coding in the working directory...2. Finished something and ready to submit works to the remote repository
3. Select the Project -> right click -> Team -> Commit
4. Input the Commit message
5. Click "Commit and Push"
Note: If you click "Commit", it will only update the local repository
6. If the file(s) is modified by others in remote repository (i.e. conflicts), the Push will be rejected.
7. In this case, you need to Pull the files from the remote repository, solve the conflict locally, and then Push the new version to the remote. (See below)
Get from remote repository:
1. Select the Project -> right click -> Team -> Remote -> Fetch From...2. Click "Finish"
Note: This only update the local Git repository, NOT the working directory
3. Select the Project -> right click -> Team -> Pull
4. Done. The working directory is also updated!
If there is conflict between local and remote repository:
1. Select the Project -> right click -> Team -> Remote -> Fetch From... (Fetch the files and you will find there is a conflict)2. Select the Project -> right click -> Team -> Merge... (It will mark and show you the conflict files)
3. You will find a red icon on the conflict files
4. Open the conflict file to solve the problem manually, or
5. You may use the merge tool to solve the problem: Right click the file -> Team -> Merge Tool
6. After the conflict solved. File -> right click -> Team -> Add to Index
7. Select the Project -> right click -> Team -> Commit
8. Input the Commit message
9. Click "Commit and Push"
10. Done! The remote repository is updated
No comments:
Post a Comment