![]() ![]() This is not the best solution as copy operations may take long time if we have many files in the Bugfix version 2.0 folder. Solution 01 − Copy all files from Bugfix to Main. Once we have completed the changes in bugfix, how do we bring the changes back to the MAIN folder? Now let’s say we made changes in the BugFix directory and made it to BUGFix_V2.0. Code in BUGFix_V1.0 is identical to the code in the MAIN directory. We take a copy of this directory and call it as BUGFix_V1.0. The code in this directory is of version 1.0. Let us say we have a directory called MAIN_V1.0. Let us understand fast-forward merge through a real-world example. In order to merge the changes to the master branch, all git has to do is to change the pointer of master forward. There is a linear path from feature to master. Now we need to bring the changes to the master branch. Now let us switch to the feature branch and do a couple of commits. At this point both feature and master are pointing to the same commit. In git a branch is nothing but a pointer to a commit. Next, we create a branch called feature branch. Let us look at an example implementing fast-forward merge. In fast-forward merge, git simply moves the source branch pointer to the target branch pointer without creating an extra merge commit. ![]() Fast forward merge can be performed when there is a direct linear path from the source branch to the target branch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |