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 :##
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:
Git status-s to check whether the files in the workspace, temporary storage area, and final zone are different.
Git diff [-- cached, Head, -- staged]: view the specific differences among the workspace, temporary storage, and final partition files.
Git add
Git comit
Git checkout [head]
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