In today's web development, there are more and more mature open-source application frameworks to support our rapid development of Web applications. But in many cases, the application framework itself is constantly adding important features to solve some of the bugs,
So how can we timing to seamlessly upgrade our application framework itself, while keeping our work moving forward? What can be applied to Git's engineering practice? This article hopes to have some discussion.
I have done the following experiments, for the moment it is feasible:
1. First assume that the third party libraries is l.git;
2. Generally first clone l.git, do basic configuration after the generation of our application App.git Note: L.git and app.git are generally bare libraries;
3.john (code farming) clone a app.git, form its own development library, such as called Dev;
4.john continues to submit the code on the dev, and eventually push to the App.git Central Library;
5. Assuming that l.git developers are constantly iterating over their framework code, the underlying framework code in L.GIT and App.git has started to diverge, and now we want to do the update of the framework itself;
6. Project manager Tom Clone a app.git, we call sync, note that the Sync library already contains the latest application code and older framework code;
7.tom Create a upstream remote:git remote add Upsteam l.git;
8.tom pull up the latest library code: git fetch upstream Master
9.tom execute rebase command: Git checkout master;git rebase upstream/master; Here our Master branch is already on top of the latest framework code, But the problem is: when the Master Branch and the master of the App.git have a fork, Git push Origin master, Git will reject and prompt us to git pull, how exactly are we half?
9.1 Either Git pull again (implicitly rebase), or merge directly, but these two jobs seem to be in the past in the 9th Step conflict resolution of the painful process again, I feel is not a good way;
9.2 Direct Git push-f Origin master, it seems that this method is simple and rough, but my question is: Because history is covered, if there are other branches on the master branch, will it create problems? To continue verifying the update.
How do I keep my apps and associated third-party frameworks up-to-date?