GitHub downloads a specific version (code) of a program

git clone download source code

git tag lists all version numbers

git checkout + a certain version number 

The source code in your current folder will become the source code of this version number.

But may encounter error:

error: Your local changes to the following files would be overwritten by checkout : xxxx 

Please commit your changes or stash them before you switch branches

You can forcibly switch the branch to discard the modification, and then checkout.

reference:

(23 DMs / 80 messages) How do I download a specific version (code) of a program on GitHub? - Zhihu (zhihu.com)

Git study notes - keep/discard current branch modification and switch to other branches - yhjoker - Blog Garden (cnblogs.com)

Guess you like

Origin blog.csdn.net/dou3516/article/details/131167461