Reputation: 1784
how do I fork an older version of a github project? I want to fork on a specific commit of a project, commit 3b5915a21a997f88fa16a6feb5b893953a06b0b5 of this
project: https://github.com/aseprite/aseprite, where a recent commit broke the main line. I really want to fork fork version 1.1.8.
Upvotes: 15
Views: 13114
Reputation: 354
A small update to the preferred answer:
As of Aug 13th 2021, GitHub is moving away from password based authentication to Token based authentication.
Prior to the last step of the procedure, you can create a token on your profile: https://github.com/settings/tokens
With this token, you can force push your changes to git, as long as you have configured your username and email to your git account. If not you can do with these on your terminal:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Upvotes: 1
Reputation: 999
I had to do the same with aws-sdk-go recently since they stopped supporting Go 1.4, yet AWS had my Preconfigured Docker configuration locked at Go 1.4 and unable to upgrade to Go 1.5.
git clone [email protected]:__________
git reset __________
git add && git stash
git push --force
With that I was good to go to import the new repo that wouldn't break my application. Woohoo!
Upvotes: 19
Reputation: 137398
Fork the entire project. This is the only way.
Create a new branch off of that commit.
$ git checkout -b my-branch 3b5915a21a
Commit changes to your branch.
Push the changes to your forked repository.
Submit a Pull Request back to the original project.
Upvotes: 16