Git interacts with a remote repository to pull and submit data

Source: Internet
Author: User

1. The project maintainer establishes a remote data warehouse and uses Git init to initialize a warehouse.

2. Other developers, centered on the data warehouse, submit their own code for confirmation by the Project maintainer.

# Create an image for a remote Repository :##

Git remote add wiki [email protected]:/project/


# Pull data locally :##

  1. Git pull

This command will directly merge the branches of the remote repository to the current branch, which is not confirmed by the developer and is not humanized.

2. Git fetch

This command pulls the remote data to the local device. After confirmation, the remote data can be merged and humanized.

Git fetch wiki master: Verify (pull the remote warehouse data to the local verify Branch)

Git diff verify (check whether the current master branch is different from the verify branch, that is, check whether the local code is different from the remote code)

Git merge verify (confirm and adjust the local code, merge verify content to the current master branch, and then continue coding .....)


# Submit local data to a remote repository ##

Git push

3. The project maintainer confirms the Code submitted by the developer in the data warehouse and determines whether the code is accepted or not.

Git commands involved in the above operations:

  1. Git status-s to check whether the files in the workspace, temporary storage area, and final zone are different.

  2. Git diff [-- cached, Head, -- staged]: view the specific differences among the workspace, temporary storage, and final partition files.

  3. Git add

  4. Git comit

  5. Git checkout [head]

  6. Git Reset

.......

.

This article is from the "blue fin dolphin" blog, please be sure to keep this source http://likunheng.blog.51cto.com/9527645/1571861

Git interacts with a remote repository to pull and submit data

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.