![]() If someone has pulled your branch, or you have pushed it somewhere, you should merge into it instead, to avoid confusion and extra work on the other end. Git Workflow create a feature branch based off of master git checkout -b feature-branch make some commits to your feature branch open a pull request to merge. The actual result after git rebase master in branch feature is this: ( A-B-C ) A'-B'-C' featureĬommits A, B, C are dangling after the rebase, but are reachable through git reflog feature as Merge However, git rebase is only suitable when nobody else is working on it, or there will be confusion and extra work for them, because the old commits A, B, C are now replaced by new commits A', B', C', plus F and G that were not there before. ![]() Taking the example from the git rebase manual, git rebase master in branch feature: A-B-C feature A'-B'-C' featureĭ-E-F-G master D-E-F-G master If the branch has not been distributed to other people, in this case i would prefer git rebase.īecause git rebase makes it as if the changes on the feature branch were made on top of the changes on the master branch, which makes the version graph simpler. Open the terminal and check out your feature branch.You can either git merge master or git rebase master. While most conflicts can be resolved through the GitLab user interface, some are too complex.Ĭomplex conflicts are best fixed locally, from the command line, to give you the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |