Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I fork an older version of a github project?

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.

like image 234
j0h Avatar asked Sep 17 '16 03:09

j0h


People also ask

How do I get an older version of a Git code?

There are two ways to use the git checkout command. A common use is to restore a file from a previous commit, and you can also rewind your entire tape reel and go in an entirely different direction.

Is cloning a repository the same as forking?

Any public Git repository can be forked or cloned. A fork creates a completely independent copy of Git repository. In contrast to a fork, a Git clone creates a linked copy that will continue to synchronize with the target repository.

Is forking the same as branching?

Branching is to create another line of development in the project without affecting the main branch or repository. Forking, on the other hand, is to make a clone of the repository on your GitHub account without affecting the main repository.


1 Answers

  1. Fork the entire project. This is the only way.

  2. Create a new branch off of that commit.

    $ git checkout -b my-branch 3b5915a21a

  3. Commit changes to your branch.

  4. Push the changes to your forked repository.

  5. Submit a Pull Request back to the original project.

like image 164
Jonathon Reinhart Avatar answered Sep 20 '22 11:09

Jonathon Reinhart