Version management · Fun git (teamwork)

If you want the one called "cooks" the programmer, and you develop together, first you have in your code repository to add to this project cooks to make this developer.
Specific steps:
Project -> Administration -> Project management members -> Developer -> add project members -> Enter "huofu"
concrete steps in the GitHub:
Project -> Settings-> Collaborators-> Enter "huofu"
In order to give everyone demo, I created a trumpet, and add it to my project a developer.
Here Insert Picture Description
Next we will switch to F disk path to simulate a new user.
We enter

 git clone https://gitee.com/blizzawang/lianshou.git

This instruction is the role of the corresponding address of the warehouse project to the local clone. After the implementation, under the F-rrd on more than a folder, this is the first user to push up the project. Let's call the administrator, that the second user is called a developer.
Then we went down to create a clone file in the directory, and then casually enter some content.

We commit to the project after modification.

git add .
git commit -m "这是第二个用户提交的文件"
git push https://gitee.com/blizzawang/lianshou.git master

In this way, our second project will be pushed to the user online warehouse.
If no pop-up prompt box enter a user name and password, or do you explain the first user's information using git, you will need to switch users, then perform the above operation.
Here Insert Picture Description
Such lines have a warehouse just push files, one might ask, is this not a huofu config.txt file submitted by you, or show administrators how to submit it? Indeed the two submitted by the user, but because you are to commit the same computer, server, or you will think twice submitted the same person.
This is the first time we return to a user's working directory, you will find only a file directory, it means that the online version of the warehouse is higher than the first version of a user, this time we need for a local warehouse updated input

git pull origin master

This time to see the working directory, and find content online warehouse agreement.

Guess you like

Origin www.cnblogs.com/blizzawang/p/11411734.html