1. Create a local library (see git basis)
2. Create a remote repository in GitHub, to obtain its address
3. an alias address
git remote add [alias] [Address]
4. pushed to the remote repository
git push [alias] [branch]
The library clones from the remote to the local library
- Download the complete remote library to the local library
- Create a remote origin address alias
- Initialize the local library . Git
git clone [Address]
There are branches under the circumstances, you can not operate, you need to enter a branch
Non-team members to modify the file can not be submitted directly to the remote library, team members need to be invited back, in order to have the authority to write
Invite steps are as follows:
Suppose for the inviter A, B is invitees
1. A find B
2. A copy click Add collaborator invitation link, send B,
3. B receive a link, and access the address, Accept invitation, this time is the B team members can modify the file, and push to the remote repository.
6. modify remote library pulling
git fetch [alias address] [remote branch] - downloaded from a remote library
remote fetch just downloaded to the local library, and does not modify the local workspace file, where downloaded from the remote library in it?
git checkout [alias address / remote branch]
Is stored in the one branch , after confirmation, incorporated by merge operation is required
git merge [alias address / remote branch] - Merge
Simple operation do not conflict, can directly download and merge pull pull = fetch + merge
git pull [remote address alias] [remotebranch]
Resolve conflicts
- If the modification is not based on the latest version of the remote repository GitHub do not push, you must first pull.
- Pulling down state if access to the conflict, in accordance with the "branch resolve conflict" to operate.