databaserのブログ -2ページ目

databaserのブログ

ブログの説明を入力します。

Previous article mentioned in the 'git pull' is equivalent to 'git fetch' plus 'git merge', and also referred to the pull command support rebase mode, this article will explain what is the difference between the merge and the rebase. Since we mainly want to see the difference between merge with rebase here is to use the local repository of branches demonstrates. New Nike Free Run 3 Shoes Women Navy Womens In fact, the introduction branches merge article has been introduced in some branches merge the contents, here were some additional and summary. Here we begin a warehouse based on local, current branch warehouses situation as follows: In fact, merge command will conclude three situations occur: merge command does not take effect when the target branch is the current Air Jordan 11 Red Mens Basketball Shoes branch ancestor commit node, that is the current branch is already up to date, Air Max 2012 Black Red White in which case the 2015 Nike Free 5.0 merge command has no effect. In the current warehouse, when Nike Zoom Lunarposite we merge the dev branch to master time, you will get 'Already up-to-date.' Fast-forward merge mode when the ancestors of the current branch is the target branch commit node, it will happen Fast-forward the merge , see the figure at this time the object model is updated, here merge operation just dev branch HEAD update references, pointing to the latest commit object tripartite merger, please refer to 'Git Step by Step - (5) Git branch (branch) 'branch merge content. If there Air Max 2012 Green Orange Black is no conflict, Git branch will help us to complete the merger, if there is a conflict, we need to manually resolve the conflict. Fast-forward consolidation pattern we have seen in the previous Fast-forward merge mode, this consolidation pattern is very simple, just HEAD quote updates. But after the merger, the information we do not branch from 'git log' in. In Git, we can choose to merge when the ban Fast-forward. Now, we revoke previous Fast-forward merge through 'HEAD ~ 1 git reset -hard'. Then, we add '-no-ff' in the merge commands to merge operations. cherry-pick where we will insert introduce a very useful command, although it has nothing to do with the merge. In practice, we may often encounter 616116-991 Red Black Nike LeBron X PS Elite Online this situation, on a branch A has submitted an update, but later discovered that we also need to apply this update on the branch B. So then cherry-pick can help you solve the problem. We have to do is through 'git reflog' find the updated SHA1 hashes on A, then switched to the B branch using the 'git cherry-pick'. When we had to manually merge conflicts, and then proceed to 'cherry-pick' the time, Git will give friendly interface, if we do not need to update the submitted message, we can ': wq' to save and exit. At this point, the 'cherry-pick' operation is successful. front rebase we introduced the merge, now Nike Air Max 2011 Men look rebase. During the merge, the good is that we can see the branch history information, but a lot of time if the branch, the branch history may become very complicated. If we use rebase, then history will remain linear submitted. rebase the principle: first current branch HEAD reference points to the common ancestor of commit node target branch and the current branch, and then commit the current branch on one apply to the target branch, and then later apply End HEAD reference point to the current branch. Is not it a bit around, let's look Air Max 2012 Green Orange Black at instances. Here are just beginning rebase, we will Air Max 2012 Black Red White create a new one based on the master release-1.0 branch, and submit an update on the branch. At this point, we execute 'git rebase master' on the release-1.0 branch, you will get the following object graph. Works according to rebase analysis: the HEAD reference to the current branch point '00abc3f' then commit on the current branch to the target branch one apply, this is the 'ed53897' Updates apply to the master; note that if there is no conflict, here will directly generate a new update last update references to the implementation of the current branch HEAD latest submission '8791e3b' This is the rebase operation, you can see through the rebase operation, then commit our history will remain linear. In this case, when we switched to the master branch, then 'git merge release-1.0' when the branch consolidation, master will direct the Fast-forward merge mode, commit history will be linear. Of course rebase operation will generate conflict, when a conflict occurs, we can skip over the current patch (must be careful, do not use, in order to avoid lost updates); also can manually resolve the conflict, and then continue to rebase operation Air Jordan Outlet rebase in interactive Nike Air Max mode Actually, rebase there are other very powerful features, New Nike Tr Fit Running Shoes Black such as rebase interactive mode, interactive mode, we can change the commit message, delete commit, merge commit and change the order of commit, and so on. If we now want to update a commit message, we can use the rebase interactive mode, find commit hash value, and then enter the interactive mode. According to rebase operating tips, we choose the edit action, then save and exit. In this case, Git will prompt us, is to make changes, or you can continue to operate. Here we 'git commit -amend' to enter edit mode. In the edit mode to commit to update, and then save and exit, continue rebase operation. For other commands rebase interactive mode, do not do here presented, interested students can google it. This article Air Jordan 14 Grey Red Womens summarizes the main to merge and rebase introduced. For the final result in terms of, rebase and merge there is no difference, does not occur rebase and merge resulting in a final update inconsistencies. rebase and merge main difference is: rebase clearer because commit history is linear, but the date has not necessarily commit row, but commit after commit branch of the total current in the back (refer to rebase principle) merge history is becoming more complex and it reflects a certain degree of information for each branch, Womens Nike Kobe VIII and commit sorted by date. You can choose which way to pull the remote update of the project according to their own needs.Git Step by Step (8): Git's merge and rebase