0

I have two github repositoryes and I want to pull code from one to another with saving of commit history. How can I do that? Second is not a fork of the first unfortunately.

1 Answer 1

1

I don't believe there's a way to pull from one GitHub repo to another directly but you can totally do it manually.

First, pull from your first repo:

git pull 

Second, add the second repo as a new origin:

git remote add origin2 <new_repo_url> 

Finally, push to the second repo (origin2, that is):

git push -u origin2 <branch_name> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.