I forked a repository and cloned it in my local environment, I did some changes in master and create a pull request to merge my changes with the original repo.
But, I have to correct a new bug and I don't want to correct this bug in master of my forked repo, I want to "fork again" in another branch and call it "bugXXX" and create another pull request just with changes to fix this specific bug.
So, how can I fork again in another branch the original repo and fix the bug and create another pull request ?
Thanks.
There is some lack of detail in your question, but I think this is what you want to do.
You don't have to "fork again". Just create a new local branch, say fix-bugXXX
:
git checkout -b fix-bugXXX
Fix the bug on this branch, add your changes and commit them locally:
git add file1 file2
git commit -m "Fix bugXXX"
After that, push this new branch to your own GitHub
repository. This will create the new branch fix-bugXXX
on your GitHub repo as well. Assuming that you left things named by default, the command is:
git push origin fix-bugXXX
In the end, just go to GitHub and create a new pull request from your fix-bugXXX
branch to one of the original repo's branches.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.