如何在GitHub中获取修订版的源代码

如何在GitHub中获取修订版的源代码,github,repository,Github,Repository,我正在使用BitBucket作为GitHub存储库,我想知道如何获取特定版本的源代码 几天前我提交了一些更改,我想要该修订版的全部源代码,我如何获得它?Bitbucket是Mercurial/Git存储库,是GitHub的竞争对手 如果要检索特定的变更集/修订,可以使用Git或Mercurial 使用mercurial: cd C:\Temp hg clone https://yourusername@bitbucket.org/repoowner/projectname hg up -r re

我正在使用BitBucket作为GitHub存储库,我想知道如何获取特定版本的源代码


几天前我提交了一些更改,我想要该修订版的全部源代码,我如何获得它?

Bitbucket是Mercurial/Git存储库,是GitHub的竞争对手

如果要检索特定的变更集/修订,可以使用Git或Mercurial

使用mercurial:

cd C:\Temp
hg clone https://yourusername@bitbucket.org/repoowner/projectname
hg up -r revnumber

其中,
revnumber
是您想要检索的版本号。

Bitbucket是Mercurial/Git存储库,是GitHub的竞争对手

如果要检索特定的变更集/修订,可以使用Git或Mercurial

使用mercurial:

cd C:\Temp
hg clone https://yourusername@bitbucket.org/repoowner/projectname
hg up -r revnumber
其中,
revnumber
是您要检索的版本号。

使用Git,假设您的版本发布在
master
分支:

cd C:\Temp
git clone https://yourusername@bitbucket.org/repoowner/projectname
git checkout master@{2 days ago}
(不是开玩笑,您可以指定这样的日期规范!)

使用Git,假设您的修订版发布在
master
分支上:

cd C:\Temp
git clone https://yourusername@bitbucket.org/repoowner/projectname
git checkout master@{2 days ago}
(不是开玩笑,您可以指定这样的日期规范!)