Git Learning -- & gt; community collaboration and branch operations

Source: Internet
Author: User

 

1. First add the url of the master database to the local machine,

Git remote add <RepoName> <URL>

 

2. Obtain the modification record of the master database

Git fetch -- get modifications on the server

Git merge -- merge to merge the master database to its own branch

Git pull -- get changes and merge

Git push -- submit the modification to the server

Pull Request -- apply for merging and merge your modifications to the master database

Click fork to create your own branch. You can submit your own issues on the master database. You need to add the url of the master database to the local branch first.



3. Create a New Pull Request

ClickPull RequestsButton

 


In the new page, clickButton, such.

 


 



4. view the submitted results

In community-based collaboration, common users only have the submit function and no Merge function. Only Administrators have the Merge function. administrators can click the button to merge the tasks, the system will automatically close your request.

 

After a common user submits the request, the system will automatically close the request. After clicking the Send button again, we will go to the page again, so there is no record under the open option, however, there is a request submission record under the Close option, as shown in:




 

5 branch operation commands

Git branch -- View branches

Git branch-d <branch name> -- delete a branch

Git branch-D <branch name> -- force Delete

Git checkout-B <branch name> -- create a branch

Git checkout <branch name> -- switch Branch

Git merge -- no-ff <branch 1> -- merge Branch

PS: Git branch management. You can view the blog written by instructor Ruan Yifeng.

There are also many problems encountered during the development process. without affecting the main branches, we will create a backup for the main branch. The other one is also known as the shadow of the main branch, we now perform various operations such as adding, modifying, deleting, and so on this shadow. After testing the branches, we merge them into the master database, as shown in.

 

Create branch command

Git branch


-- Continuous editing

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.