First of all, you should not change the local master branch, you should only create function branches. If you saved your local master unmodified, then you can get the latest changes to the upstream repository:
git remote add upstream <url-for-upstream-repo> git fetch upstream
Now your upstream/master remote tracking branch is in sync with the latest changes from upstream . If you wish, you can also update the local master if you want:
git checkout master git merge upstream/master
Now you can create upstream/master function branches:
git checkout -b feature upstream/master
If you want to synchronize function branches with the latest changes from upstream , you can use rebase if no one is working on the function branch (otherwise you will eventually force them to re-synchronize with the changed history). rebase is actually perfect for this workflow, as you can usually use it to synchronize function branches as often as you want, without creating a messy history because they don't create commit commit:
git fetch upstream git checkout feature git rebase upstream/master
You could also git merge upstream/master instead of reloading, but you will leave the merge credit, so over time you will create a more complex history by joining rather than reloading.
When you are ready to send the transfer request, just click on origin and make a request against the upstream master .
The original poster asks:
[I] Is there a way to create a branch in my fork that is a perfect copy of another remote master?
As long as your local master does not diverge from upstream/master (which should not be done if you did your work in function branches and not directly in master ), just click on your local master on origin :
git push origin master
Alternatively, you can use refspec to direct the upstream/master remote tracking branch to your origin/master :
git push origin upstream/master:master