----- Original Message ----- From: Jan Janovic To: [email protected] Cc: [email protected] Sent: Sunday, October 26, 2014 10:16 AM Subject: [git-users] Forked GIT repositary update
Hello coleagues! I have basic experience with GIT and I'm wondering for long time, how to solve this. We are working on the open-source project and at the beggining I've forked original repository and created our own. A new branch was created there for the purposes of our module development. However, there is also intensive development in progress in the original repository and now, I would like to merge their code with our repository. How can I do that? These repositories are on different places and we are developing separate module which is not in the original project. Thanks in advance for any advice or tip. -- 1. Create a 'remote' (name of your choice) for the original repo (that you forked from), assuming you don't already have one. 2. 'git fetch' their latest developments (which will be placed into a remote tracking branch (rtb)). Note that the rtb's are not usually displayed unless you ask. 3. Typically you will then 'git checkout -t ....' to create a local (i.e for you) version of the rtb, for easy visualization etc. The '-t' option sets up the tracking options 4. Having visualized the two developments that you hold 'locally' (i.e yours and theirs), do a merge between the branches, allowing plenty of time to resolve the conflicts. One trick is initially create a temporary branch (copy) of your own branch and do all your test merges into that one (and subsequent temporary ones), until you have it right. 5. Then you can delete all the failed temporary merges, and 'swap' the successful merge tmp branch with your main branch (another merge, but --ff-only ?). The Git Gui can be useful is allowing visualization of which hunks to select. Many other support tools are available to suit your tastes.. Philip (written without checking my facts; always read the manual ;-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
