Assumptions:
1.) You have a github account.
2.) You already have 1 project pushed in your account.
3.) You have another empty github project.
Steps:
1.) Add the empty remote repository, name it clone.
2.) Create a local branch name clone -> select checkout new branch.
3.) Push to upstream so that the local branch will be added to the original repository.
4.) Configure clone branch set remote=clone.
5.) Double click clone local branch.
6.) Push to upstream to commit the changes to the empty repository. Go to github and check if the project is properly pushed.
7.) You can now switch between local branch and push to the necessary remote branch.
*Note: The 2 local branch can now be merge
What if you want to delete the remote repository and the clone branch in your original project?
1.) Delete local clone branch, first you mush double click the master branch so the clone branch is not active.
2.) In command prompt go to the first repository's directory and execute: git push origin --delete clone
3.) Delete remote branch
0 nhận xét:
Đăng nhận xét