git handles the personal library code of the fork and the remote project library to be synchronized and merged with the code

Because each project group's git code management specifications are inconsistent, branch development and fork development mode. Let me talk about the process of fork processing.

Problems:

My code is clone from my remote personal repository. My personal remote warehouse code is fork from the remote warehouse of the project.

My clone code modified a part of the code locally. During my modification, the remote library code of the project was submitted by other colleagues for many versions. How to deal with the code synchronization between my local code and my fork library and the remote library of the project Merge with commit?

The process is as follows:

################################################ ###################################### #The 
overall process is as follows 
1. The code of fork library clone to local 
2. Modify the file 
3. git commit -m "" Submit our modification 
4. git push origin master 
5.git remote -v View the list of remote repositories 
6. git remote add base https: // fork before The original address of the project 
7.git remote -v You can see the address of our base remote library 
8.git pull base master Get the master branch of the remote library and merge the local code 
9.git commit -m "" After submitting the merged Code 
10. git push origin master Submit the merged code to your fork library 
11. Initiate a merge request with the remote library of the project in your fork library 
# 
#idea The operation is the same as above (it is recommended to use idea to follow the development process) 
It is recommended to use idea pull remote library, so that if there is conflict, you will be prompted to merge during the pull process. If you use the command line, you must manually open the file for conflict handling. 
################ ################################################ ######################

  

 

Guess you like

Origin www.cnblogs.com/shaozhiqi/p/12714958.html