Merging two remote branches in git

EDIT

Let me rephrase, I would like to merge two git repositories with the same name but with a different remote.

That is, I have a repo_name hosted in git, under the branch name repo_name_a, and I added another branch to git under the branch name: repo_name_b

Now, to merge them, what can I do?

+4
source share
1 answer

The answer I cited below related to the previous version of the scam question. Now this is a completely different question. This may not be relevant.

, , , git, /, , /.

git clone https://github.com/master_repo/master_repo

- . ,

git checkout -b test_repo .

, , git add <name of file> git commit , , ,

git push origin test_repo

, test_repo.

, , ,

git checkout master git merge test_repo

, , , .

git push origin master .

, , , - github, " " test_repo . , , .

, - . , , pull master -. , git , , .

, , , git remote prune origin , ( , .)

+21

Source: https://habr.com/ru/post/1544024/


All Articles