Git: How To Accept Two Local Branch Pushing To Two Unlike Remote Repositories As Well As Then That Yous Tin Merge Code

This tutorial volition explicate how to practice two local branches alongside the same code base, each linked to dissimilar repository. The usage is that yous tin percentage code betwixt repositories. For example inward a multi-module project, it's possible that 1 projection volition convey dissimilar implementation depending on the client.

Assumptions:
1.) You convey a github account.
2.) You already convey 1 projection pushed inward your account.
3.) You convey to a greater extent than or less other empty github project.

Steps:
1.) Add the empty remote repository, refer it clone.
2.) Create a local branch refer clone -> choose checkout novel branch.
3.) Push to upstream as well as hence that the local branch volition endure added to the master copy repository.
4.) Configure clone branch laid remote=clone.
5.) Double click clone local branch.
6.) Push to upstream to commit the changes to the empty repository. Go to github as well as cheque if the projection is properly pushed.
7.) You tin at i time switch betwixt local branch as well as force to the necessary remote branch.
*Note: The two local branch tin at i time endure merge

What if yous desire to delete the remote repository as well as the clone branch inward your master copy project?
1.) Delete local clone branch, outset yous mush double click the principal branch as well as hence the clone branch is non active.
2.) In dominance prompt larn to the outset repository's directory as well as execute: git force root --delete clone
3.) Delete remote branch
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.