Is there a way to export a sequence of commits into a patch from Git. Say I need to export the last 5 commits from a repository and import them into another repository. How would I go about doing that?
Help with this would be appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git format-patchis designed for that purpose:The output is a readable BSD-mailbox-style file that contains patches along with some metadata such as the commit messages. To import the patches into the other repository, use
git am: