frosty
frosty

Reputation: 2852

Is it possible to merge changes from old repository to a duplicated repository?

In GitHub, Is it possible to merge changes from old repository to a duplicated repository? If it is possible, what are the steps involved?

These are the steps I'd follow to duplicate a repository.

Upvotes: 1

Views: 75

Answers (1)

Julian
Julian

Reputation: 36730

Yes, but you should do it local.

So

  1. Clone you repo locally. git clone <url>

  2. Added a second remote for the old repository git remote add old <url>

  3. Checkout a branch from your second remote and push it to the first. E.g. something like this:

    git fetch old
    git checkout old/mybranch
    git checkout -b newname
    git push origin -u
    

Upvotes: 1

Related Questions