First, create a local warehouse
Create a new folder, named Localrep, as the local repository.
In the terminal cd+ Drag folder to the terminal, open the folder in the Localrep directory Operation clone remote repository to local, the instructions are as follows (need to change the relevant parameters and paths according to the actual situation):
Cd/users/qiaodandan/desktop/localrep
git clone [email protected]: Repositories/teamworktwo.git
After downloading the remote repository, you will see the downloaded remote repository under the folder:
Second, install Sourcetree, and carry on the warehouse scan to add
After installing Sourcetree, open the Sourcetree, drag and drop the local warehouse folder, and the effect:
Then click on the warehouse, access to the Warehouse management interface,:
Third, create the local branch code and submit
Back in the warehouse, open the project with Xcode and create a new branch with the latest version of the local code version already updated.
Select Trust.
Enter the provided password.
View git log at the terminal as follows:
Go back to Sourcetree to view the visual interface record as follows:
Note that uncommitted changes are shown in the Sourcetree because the file homezxb-3.8.0/homezxb.xcodeproj/project.xcworkspace/xcuserdata/ Qiaodandan.xcuserdatad/userinterfacestate.xcuserstate has changed, here commits failed to properly rewrite the file, the file was discarded by the local cache of the file:
After each conflicting file has been processed, push push is done.
This shows that the changes have been committed:
Iv. Merge local branch to master and submit
If you discard the UserInterface file, you can merge successfully and merge successfully:
To push again:
V. Merge of local code and server code (IBID.)
Figures:
Git Server and Sourcetree client usage instructions