Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info on how to checkout earlier versions pre-GitHub migrations #572

Open
Mariatta opened this issue Feb 12, 2020 · 2 comments
Open

Add info on how to checkout earlier versions pre-GitHub migrations #572

Mariatta opened this issue Feb 12, 2020 · 2 comments

Comments

@Mariatta
Copy link
Member

@Mariatta Mariatta commented Feb 12, 2020

It would be great if Git Bootcamp has information on how to checkout git tags to get the earlier CPython releases (e.g. 3.3, 3.4 )

3.3. and 3.4 aren't on CPython's GitHub as branches (unlike 3.7, 3.8, etc), but there are git tags, can can be checked out as follows:

# list all git tags matching v.3.3
git tag -l 'v3.3*'

# checkout the v.3.3.0 tag to a local branch
git checkout tags/v.3.3.0 -b my-own-3.3.0-branch
@ned-deily
Copy link
Member

@ned-deily ned-deily commented Feb 12, 2020

It's a bit simpler than that. You don't need to specify tags/ when referencing tags.

git checkout v3.3.0           # for detached head state
git checkout v3.3.0 -b v3.3.0 # to also create a local branch

https://git-scm.com/book/en/v2/Git-Basics-Tagging

@zware
Copy link
Member

@zware zware commented Feb 12, 2020

We've also kept tags for old branches with the same name as the branch (for example, 3.2, 3.3, etc.), though that tag doesn't seem to have been created for 3.4 it seems an explicit git fetch --tags upstream may be necessary to get them all. With those tags, there's no difference to checking out an active branch, with the exception that you'll be on a "detached HEAD" if you don't create your own branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.