Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git fork from certain tag version - requirements.txt

Tags:

git

github

django

I want to fork one github project code, but not from master branch, but from older release.

Reason: I want to edit one place in the code in my fork version and put the url of this tag version into my requirements.txt so that

pip install -e git+https://git_url_to_my_form_in_this_tag_version

works.

I found the tag version in github, but once I fork it, it is being forked from master and not from exactly that tag.

how can I do it?

like image 338
doniyor Avatar asked Jan 09 '23 03:01

doniyor


1 Answers

Forking the repository clones the entire repository, not just the master branch. You can then checkout the tag you want to work on, make the required changes, and create a new tag.

# checkout the tag
git checkout tag_to_fork_from

# alternatively, create a new branch starting with the tag
git checkout -b mybranch tag_to_fork_on
like image 117
Alasdair Avatar answered Jan 15 '23 15:01

Alasdair