Version management · Fun git (pushed to the remote repository)

After the previous exercise, you manage the code has been more proficient in the local warehouse, but if it is team development, how to tie together?
We can put in repository on the Internet, the developers put their latest push into the online version of the warehouse, at the same time, the latest code online pulled his local repository, so that you can work with.

So what can online warehouse for us to use it? Foreign undoubtedly the hottest online repository GitHub, but in the country, we also have their own line of warehouses, yards clouds, cloud nor that this code Ma. We click on the link to sign up for an account. https://gitee.com/
Next we come to create a new warehouse.
Here Insert Picture Description
GitHub used, then these operations should be very simple.
We create such a warehouse.
Here Insert Picture Description
Once created like this.
Here Insert Picture Description
This is an empty warehouse, warehouse nothing, then that is your warehouse address within the red border.
Next we will just rrd project to push this line to the warehouse.
We enter

git remote add origin https://gitee.com/blizzawang/lianshou.git

It followed afterwards by your warehouse address, and then enter

git push -u origin master

When the file is very large when you need to enter the first submission -u, -u after the submission of this can be omitted.
Here Insert Picture Description
If the console so git display, indicating that the push is successful, we just refresh the page.
Here Insert Picture Description
This shows that our project is successfully pushed to the online warehouse.
We have just two lines of instructions by the project will be pushed to the online warehouse, let me explain these two lines of instructions.
Which git remote add origin https://gitee.com/blizzawang/lianshou.gitmeans that this warehouse address to mark, that is, to the warehouse a name, the name for the origin, the name you can arbitrarily take. So when we enter the second line of command git push -u origin master, on behalf of the origin of that it is https://gitee.com/blizzawang/lianshou.git. According to this argument, we can complete two abbreviated one, so you can write like this.

git push -u https://gitee.com/blizzawang/lianshou.git master

This is the same effect in two ways.

Guess you like

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