This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Moving branches/tags from one git repository to another | |
1. Clone existing git repo (source repository) | |
git clone --mirror <source git url> | |
eg | |
git clone --mirror [email protected]:source/source.git | |
2. | |
got to <folder with name of repo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You have branch having latest changes “latestBranch” and if you want to override master with latestBranch changes. | |
Use following commands | |
1. Checkout latestBranch. | |
git checkout latestBranch | |
2. Merge latestBranch with master with strategy as ours. Current branch changes will be used in case of conflicts. | |
git merge -s ours master | |
3. Checkout master branch. |