⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

GitHub noob question - merging main repo into my own fork.



steveoc
  • profile picture
  • Member

Posted 19 January 2012 - 22:21 PM

I have a question about using git, thought this might be the best place to ask it.

Given that I have a fork of GC in github, that I am merrily posting my own commits to - what is the easiest and simplest way to merge changes from the official GC repository into my codebase ?

Should be simple thing to do, but I cant find an obvious answer yet :(

Any clues ?

Thanks
Steve (Total github noob unfortunately)

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 19 January 2012 - 23:02 PM

Sorry steveoc I don't know the answer as I am new to git too. I used svn for 4 years and I don't know how to merge it. Though I think with a simple


git pull git@github.com:scoumbourdis/grocery-crud.git


you will have a merge of the grocery CRUD project. Be careful, backup your files first before you do this changes and try it ... perhaps it works.

If git works with the same way as svn it has to work with this and just merge your files.

steveoc
  • profile picture
  • Member

Posted 20 January 2012 - 01:41 AM

Simple - that seemed to work really well.

Had 1 small conflict with grocery_crud.php, and that was easy to fix - just a jquery include. Same as with SVN then - merge conflicts are marked in the source code, which you manually fix up. Quite easy.

After that, I did a
git push origin master

to update my tree on github. No problems there.

Here is the result :

https://github.com/steveoc64/grocery-crud/network

Will start testing it soon.

Git is super !