I have a repository. I want to apply its last commit to another repository on another machine. How can I retrieve the commit and apply it again?
Asked
Active
Viewed 59 times
1 Answers
0
I would use git diff.
Example:
- On your source repo :
git format-patch HEAD~: this will generate a patch file with the a0001prefix and the beginning of your commit message followed by thepatchsuffix. - On the destination repo :
git apply PATH_TO_PATCH
Thomas
- 3,119
- 2
- 16
- 22