I. Teamwork
Collaboration within a team is really about this.
- Big A writes the project framework and pushes it to A remote repository like Github.
- Little brother 1 takes the project from the remote library
clone
To their own local, you can do development, versioning, branch management, and so on. - Little brother 1 was developed locally, so
push
To the remote library, the remote library is the latest code. - Big A can do it now
pull
Click remote code, and pull the latest code to your own local library, so that the two people’s local library and remote library code is synchronized.
2. Cross-team collaboration
Above team collaboration, everyone is on the team, with only one remote library. Since the project is on Github, everyone can see it. Now there’s another big guy B who thinks
The project can be better optimized, but B is not A member of A’s team. How can we cooperate with each other?
- Big B passed
fork
Remote library A has its own remote library B. - Big B is pulling it from his own remote vault
clone
Code to a local library. - Big guy B after a meal of operation, the written code
push
Go to your own remote library B. - At this point, Big B launches
pull request
Tell A to pull its own code. - Big A is very cautious, naturally to big B submitted code review, in case it is A disguise big boss, to make trouble.
- Big guy A approved, confirmed that it is real big guy, rest assured
merge
Go to your own remote library A. - Big A passes
pull
Own remote library A, update the local code.
Next, integrate Git based on Github operations and IDEA.