I am new to BitBucket. I have my repository. And 2 people working on it me, Admin and another developer with Read only access.
So in order for him to do changes he forked repository and made changes, uploaded to his repository and created pull request.
Now I merged this pull request with my repository. And made few small changes afterwards and also committed them and uploaded to my repository.
What would be the next step for him to continue working? Does he have to fork it each time I make changes to my repo?
Is there some way for him to sync his with my repository without creating new fork each time?
3
He should be able to pull changes from your repository just like you are pulling when he requests. In fact, it is considered good form to pull in upstream changes — that would be changes from your repository in this case — before submitting pull requests.
If I were working with the guy pretty heavily, I would probably just let him into the repository directly. Less hoo-ha in the workflow, easier for continuous integration.
2
I’m not familiar with using Git on BitBucket since I’m more of a GitHub user, but since you’re using Git, I assume that the solution will be the same.
After your collaborator forks your project into his own BitBucket account, and clones it into his local machine, all he needs to do is add the main repository as an upstream source for his fork:
git remote add upstream https://[email protected]/yourusername/your_app_name.git
Your collaborator can now fetch the changes in your repository into his own by doing the following:
git fetch upstream
Note that this only fetches the changes and doesn’t merge it, so your collaborator has to merge it into the master branch (or any branch) of his fork:
git merge upstream/master
Once that’s done, he can now push the changes of the main repo into his own fork:
git push
This is and old question, but just for the sake of including an answer:
Your developer will notice in his forked repository a message saying that new changes has been included in the main repository (your repository), and he can merge those changes very easily.
The meessage is something like: This fork is XX commits behind “Sync now”.
Best regards,