I want to work with another programmer on a project using git on bitbucket. Since I am not the owner of the project, I did the following steps:
The owner of the project accepted my pull request and all the changes are now in his repo.
Now, I want to make a new pull request of the modified version of the project owner. Should I make a new fork of the same repo?
I forked the project (I have a copy on my repo now)
I made my changes and commited them
git add .
git commit -m "fork-commit"
I pushed to my repo
git push -u origin # the push was done into my repo: me/proj
I made a pull request & it is accepted by the owner (the master branch of me/proj and owner/proj are identical)
After that the owner did some extra changes to his master branch of owner/proj, the repos situation is as follows:
SO TO AVOID MULTIPLE FORK, should I make a git pull on the owner repo? Or should we (me and the owner) share the same repo?
Thanks,
You are unable to fork a repo twice on Github (as of late 2021) but if you want to build on the same repo multiple times, you can use the "Import Repository" option and feed it the URL used to clone.
If you don't have access to create branches on that repository, there is no way to create a pull request without forking.
You can create a pull request to propose changes you've made to a fork of an upstream repository. Anyone with write access to a repository can create a pull request from a user-owned fork.
There can be only one open PR from a given branch.
SO TO AVOID MULTIPLE FORK, should I make a git pull on the owner repo? Or should we (me and the owner) share the same repo?
No need for multiple forks, just make a git pull from the owner repo.
Always use pull requests for untrusted contributors. If it's ok with the owner, you should try different workflows and find one that both of you are comfortable with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With