0

I have a workingarea git repository with many commits. I want to pick 2 of the commits and put them into a new empty bare repository. So then the new repository will only have the 2 commits in it. Is this possible?

How would I go about doing this?

alt10
  • 1
  • 2
  • 1
    See http://stackoverflow.com/questions/5120038/is-it-possible-to-cherry-pick-a-commit-from-another-git-repository – Tim Feb 17 '15 at 12:50
  • Go for git cherrypick. – Priyanshu Feb 17 '15 at 13:00
  • If it's really only 2 commits you want, I would use `git archive` to create `tar` files of the two commits and import them manually (`git rm -r *; tar xf path/to/commit1.tar; git add -A .; git commit -m "first commit"`, and then similarly for the second...). – twalberg Feb 17 '15 at 15:40
  • Possible duplicate of [Is it possible to cherry-pick a commit from another git repository?](http://stackoverflow.com/questions/5120038/is-it-possible-to-cherry-pick-a-commit-from-another-git-repository) – Rich Apr 23 '17 at 19:33

0 Answers0