![]() Our integration was successful and, if our feature work on "contact-form" is finished, we could safely delete that branch. ![]() Under your project repo, select Branches. Note This procedure might require you to Set Git repository permissions. You must create a second branch to change the default. If there's only one branch, it's already the default. Looking at our project's commit history, we'll notice that a new commit was created: a so-called "merge commit" that represents the actual "melting knot" that combines the two branches. To change your repo's default branch for merging new pull requests, you need at least two branches. With such perfect preparation, the actual merge process itself is easy as pie: $ git merge contact-form The last thing to check before actually starting the merge process is our current HEAD branch: we need to make sure that we've checked out the branch that should receive the changes.īut since we just updated "master" and already performed a "git checkout master", we're good to go! Starting the Merge If properly configured, a plain "git pull" should suffice (after making "master" our active branch): $ git checkout master We must update "master" before we can integrate our own changes. The remark tells us that "master" has received new changes on the remote. Start with a "git fetch", followed by a "git branch -va": $ git fetch Si bien es cierto que la mayoría de los sistemas de control de versiones cuentan con esa función, en Git todo el proceso del trabajo con ramas es mucho más simple y, lo más importante, ocupa. ![]() Both your local feature / bugfix / branch and the receiving branch should be updated with the latest changes from your remote server. Las ramas en Git son una herramienta fundamental, cuya principal utilidad es que permiten al usuario o usuarios tener un mayor control del código. Preparing to Mergeīefore merging your code into one of your project's long-running branches (like a "development" or "master" branch), make sure that your local repository is up to date. Our goal is to integrate the changes from "contact-form" back into "master". Let's assume a very simple example scenario: Steps to merging branch into master Git fetching Git rebasing Switching to master Pulling changes Merging changes Pushing changes Pulling, Merging and Pushing Changes Related Resources Git has lots of powerful features that make programmers’ life more comfortable.
0 Comments
Leave a Reply. |