When you want to pull the branch code from same repo, first navigate to main branch. Main branch is the reference branch.
> git checkout master
From the main branch checkout to ‘develop’ branch. Develop branch is the name of the remote branch I am referring to.
> git checkout develop
> git pull origin develop
Now you will get the latest code from develop branch.
Below are the steps to merge the code from your branch to develop branch.
Let’s suppose you are working on the branch ‘uma-development’, Now you want to merge your code to ‘develop’ branch.
> git checkout uma-development
> git rebase develop
you may see many conflicts while doing the rebase. Try to solve conflicts one by one… after solving the conflicts, do git add
> git add.
> git rebase –continue
once your conflicts got resolved you are done with rebase. Now your branch ‘uma-development ‘ is up to date with develop branch code.
Now push the code to develop branch in remote and then raise pull request to develop branch.
Thanks,
Uma Mahesh.
> git checkout master
From the main branch checkout to ‘develop’ branch. Develop branch is the name of the remote branch I am referring to.
> git checkout develop
> git pull origin develop
Now you will get the latest code from develop branch.
Below are the steps to merge the code from your branch to develop branch.
Let’s suppose you are working on the branch ‘uma-development’, Now you want to merge your code to ‘develop’ branch.
> git checkout uma-development
> git rebase develop
you may see many conflicts while doing the rebase. Try to solve conflicts one by one… after solving the conflicts, do git add
> git add.
> git rebase –continue
once your conflicts got resolved you are done with rebase. Now your branch ‘uma-development ‘ is up to date with develop branch code.
Now push the code to develop branch in remote and then raise pull request to develop branch.
Thanks,
Uma Mahesh.
No comments:
Post a Comment