DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Move Some Commit from One Repo to Another


We need move all commit between origin/develop to develop in an old repo to a new repo.

Export all commits in old repo:

cd /path/to/old-repo
git format-patch origin/develop..develop

Now you have many .patch files in old repo. Each patch file represents a commit between origin/develop and develop.

Apply these patches in new repo:

cd /path/to/new-repo
git checkout develop
git am /path/to/old-repo/*.patch

Ref:

Getting started with git-am



Published

Dec 27, 2015

Last Updated

Dec 27, 2015

Category

Tech

Tags

  • am 1
  • format-patch 1
  • git 36
  • patch 1

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor