简体   繁体   中英

How to clone a particular git commit

https://github.com/Colt/YelpCamp/tree/36c5c12fc8b21699d7e129d661c80b3e795da801

How can I clone this particular commit into my local machine?

You can access individual commits on GitHub with the URL https://github.com/${owner}/${repo}/commit/${sha}.patch

ie, in this case, the commit is available in raw form at: https://github.com/Colt/YelpCamp/commit/36c5c12fc8b21699d7e129d661c80b3e795da801.patch

You could use any tool like cURL or wget to fetch it, or even broese to that URL with your browser and save the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM