Hi , I forked the original repository(https://github.com/phpmyadmin/phpmyadmin.git) of PMA .. then I cloned the fork repository (https://github.com/<my user name>/phpmyadmin.git)
git remote add upstream https://github.com/<my user name>/phpmyadmin.git git fetch upstream git rebase upstream master
But it said that local repo is already up to date
then I used following commands.
git remote add orig git://github.com/phpmyadmin/phpmyadmin.git git fetch orig git rebase orig master
this comands worked .... but It seems to be that my forked repository(not local repo) didn't update
1)Is there any thing to do? 2) will it be a problem when I do a pull request?
regards
On 02/09/2013 05:25 AM, Dulanja Wijethunga wrote:
Hi , I forked the original repository(https://github.com/phpmyadmin/phpmyadmin.git) of PMA .. then I cloned the fork repository (https://github.com/<my user name>/phpmyadmin.git)
git remote add upstream https://github.com/<my user name>/phpmyadmin.git git fetch upstream git rebase upstream master
But it said that local repo is already up to date
then I used following commands.
git remote add orig git://github.com/phpmyadmin/phpmyadmin.git git fetch orig git rebase orig master
this comands worked .... but It seems to be that my forked repository(not local repo) didn't update
1)Is there any thing to do? 2) will it be a problem when I do a pull request?
regards
I had to explain a similar concept to another guy recently, so here you go:
Ok, so if your repo is origin and the pma repo is upstream, here's a rough guide to fixing your issue:
git checkout master
Now Synchronise with upstream
git fetch upstream git merge upstream/master
Create a feature branch
git checkout -b fix-codemirror
commit and push
git add . git commit -m "Fixed bug #123456 - Downgrade codemirror editor to version xyz" git push origin master fix-codemirror
At this point you will have your changes in a feature branch called fix-codemirror so you can file a pull request from yourusername:fix-codemirror phpmyadmin:master.
Hope this helps.
Bye, Rouslan
thanks Rouslan ....but you mentioned that origin is my repo and upstream is pma repo But I want to clarify more about it what did you mean by my repo and pma repo ? my repo = repository in my local machine not forked repository pma repo = original repository that under this link (https://github.com/phpmyadmin/phpmyadmin.git) is that you mean?
but I cloned PMA under forked repository (https://github.com/<my user name>/phpmyadmin.git)
so then upstream is that forked repo and origin is local repo....isn't it?
thanks and regards
On 02/09/2013 11:39 AM, Dulanja Wijethunga wrote:
thanks Rouslan ....but you mentioned that origin is my repo and upstream is pma repo But I want to clarify more about it what did you mean by my repo and pma repo ? my repo = repository in my local machine not forked repository pma repo = original repository that under this link (https://github.com/phpmyadmin/phpmyadmin.git) is that you mean?
but I cloned PMA under forked repository (https://github.com/<my user name>/phpmyadmin.git)
so then upstream is that forked repo and origin is local repo....isn't it?
thanks and regards
Your repo = origin = your fork on github Pma repo = upstream = https://github.com/phpmyadmin/phpmyadmin.git
You will be interacting with both from your local copy. You fetch from upstream (new changes from other developers), then you push to origin. That way your fork will be up-to-date with changes in upstream.
Bye, Rouslan