In development, Git has become a mainstream code hosting technology. Basically, most companies are using Git for collaborative development. Many code hosting platforms are also implemented based on Git.
Git is a distributed version management tool.
Git can help us do many things, such as code version control, branch management, etc.
The main concepts in Git include remote warehouses, clones, local warehouses, branches, commits, pulls, merges, pushes, etc.
The remote warehouse refers to the place where our code is stored on the server. This warehouse is a place that everyone in our entire team can access.
Cloning: The process of cloning from a remote warehouse to a local
The local warehouse refers to the code stored locally after our developers clone a code from the remote warehouse. This code can only be seen by the developer of the cloned code.
Branch: We may encounter multiple branches during development, such as the master branch (master branch), development branch (develop branch), but when we develop, we generally do not develop on the master, but our own separate slave A branch (such as the test branch) is split from the main branch or the development branch, and then we develop on the test branch, and each branch has its own code.
Submit: After our code development is completed, we need to submit the code. When submitting, we need to submit the modified file and explain the modified content. Note that at this time, the code submission will only be submitted to our local warehouse, and the remote warehouse will not be modified at this time.
Pulling: During development, the same project may be developed by multiple people. At this time, we need to pull down the code modified by others and merge it into our own code. But if different developers modify the unified part of the code, then there may be conflicts. At this time, we need to resolve the conflicts before we can continue to submit the code.
Merge: After the above development of our own branch is completed, there is no problem, we need to merge our branch to the main branch
Push: All previous operations were performed locally, and the remote warehouse code has not changed. At this time, we need to push the local code to the remote warehouse and update the remote warehouse code. During the push process, if our local code is not the latest version, we need to pull down the remote code first (resolve the conflict if there is a conflict, submit it), and then push it again.
During development, we can reasonably use Git for management. When the new version encounters a problem, we may need to roll back the code and use the old version of the code, which can easily solve unexpected problems.
In this tutorial, you will install and deploy Jekyll on an Alibaba Cloud ECS instance running an NGINX server.
In this tutorial, we will be installing the open source GitLab Community Edition on an Alibaba Cloud Elastic Compute Service (ECS) instance.
Can Alibaba Cloud Meet the Needs of Enterprise Applications in the Process of PaaS and SaaS Transformation?
GridMarkets and Vika: Asia Stars of the Online Hong Kong Demo Day
601 posts | 96 followersFollow
Ruiguang - February 25, 2021
Hiteshjethva - March 5, 2021
Alibaba Clouder - March 6, 2019
JDP - September 10, 2021
Alex - August 26, 2019
Alibaba Cloud Indonesia - August 22, 2022
601 posts | 96 followersFollow
Accelerate software development and delivery by integrating DevOps with the cloudLearn More
Web App Service allows you to deploy, scale, adjust, and monitor applications in an easy, efficient, secure, and flexible manner.Learn More
More Posts by Alibaba Cloud Community