In order to be merged, the tip of the remote branch cannot be behind the branch you are trying to push.īefore pushing, make sure to pull the changes from the remote branch and integrate them with your current local branch. In order to push your branch to another branch, you may need to merge the remote branch to your current local branch. Remote: Resolving deltas: 100% (1/1), completed with 1 local object. In order to push your branch to the “ feature” branch, you would execute the following command $ git push origin my-feature:feature However, you want to push your changes to the remote branch named “ feature” on your repository. $ git push :Īs an example, let’s say that you have created a local branch named “my-feature”. ![]() In order to push your branch to another remote branch, use the “git push” command and specify the remote name, the name of your local branch as the name of the remote branch. In some cases, you may want to push your changes to another branch on the remote repository. Congratulations, you have successfully pushed your branch to your remote! Push Branch to Another Branch
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |