I am currently working on a project in which I have the reporter rights (not allowed to push etc.). Unfortunately I did not create a fork, but cloned the original one on my machine and now I am struggling with the idea how to publish it to get feedback.
Since I can't push to the original repository, I thought I could just create a new repository and change the remote, but it seems to me that I will lose the connection to the original one and can't pull anymore to update the changes. Will setting different push remote and different pull remote be enough to solve this problem ?
What would be the reasonable scenario to follow in my case ?
Working from a fork of the original project would have been the best strategy since it would allow you to easily submit PR (pull requests) to it. So the best is to get back to this classic contribution setting:
Fork the original project
Set this fork as the remote
for the project you have on your computer (the clone you made from the original project and on which you worked)
cd <path-to-your-local-repository>
git remote add origin <address-of-your-fork>
git fetch
git merge origin/master
Note that steps 3 and 4 can be achieved in one command with: git pull
.
git push -u origin master
(Replace master
by the name of your branch if you are working on a brach).
upstream
(so that you can pull or fetch the changes to keep your fork up to date with the original project)git remote add upstream <address-of-original-project>
Now you can push to your fork (for feed-back), you can pull or fetch from the original project (to keep up to date), and you can easily submit PR to the original project.