We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8898
    • 181 Posts
    enigmatic_user Reply #1, 16 years ago
    Hi,

    Some time ago I forked the Revolution repository, worked locally on the develop branch (updates for the German translation), pushed the commits and sent a pull request. Everything worked as expected, and the commits were pulled.

    In the documentation, it is said that when the local files should be updated, it is sufficient to enter
    git fetch origin  
    git rebase origin/develop

    Well, the repository gets indeed updated, but the newest commits are missing. I downloaded the newest version from https://github.com/modxcms/revolution/tree/develop directly, and in /core/docs/changelog.txt there’s a bunch of additional entries:
    - [#2690] Renamed Administrator Access Policy Template Group to Admin
    - [#2563] Fixed chmod action on directories from File Tree
    - [#2693] Properly sort country indicies to properly display in dropdowns
    - [#2562] Added confirm dialog and success response for emptying recycle bin
    - [#2634] Ensured context key is changed when changing parent of a Resource via Edit Resource page if context is different for new parent
    - [#2631] Fixed issue when drag/dropping categories onto other categories in Element tree
    - [#2659] Fixed issue where action buttons were overlapping tabs on edit pages
    - [#2668] Fixed issue with FC rules and labels on checkbox/radio fields
    - [#2582] Fixed bug with orm tree preventing attributes on the root node
    - Fix bug in phpthumb allowing remote src parameters regardless of settings
    - [#2555] Expose additional phpthumb options in System Settings
    - [#2503] "Preview" inaccurately described viewing current page/site. Changed to "View".
    - Fixed help message strings to correct URLs
    - Fixed missing options array call in modRestClient, isArray call in modRestCurlClient

    What am I doing wrong? I’m quite new to Git, so maybe I’m missing something here...

    Cheers,
    Jan
      This message has been ROT-13 encrypted twice for higher security.
      • 28215
      • 4,149 Posts
      splittingred Reply #2, 16 years ago
      First off, this document will become invaluable to you: http://rtfm.modx.com/display/revolution20/MODx+GitHub+Contributor%27s+Guide

      If your Git repo is pointing to your fork, "origin" will be your fork - not modxcms/revolution.git. You’ll need to add it as a remote, called "upstream":

      git remote add upstream -f http://github.com/modxcms/revolution.git
      


      Then to update your fork:

      git fetch upstream
      git checkout develop
      git merge --ff-only upstream/develop
      git checkout master
      git merge --ff-only upstream/master
      git push origin develop master
      


      There you go!
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 8898
        • 181 Posts
        enigmatic_user Reply #3, 16 years ago
        Thank you very much, I’ll look at it as soon as I find some time for it.

        I guess it would be a good idea to put a link to http://rtfm.modx.com/display/revolution20/MODx+GitHub+Contributor%27s+Guide on the page http://rtfm.modx.com/display/revolution20/Git+Installation. Because it was described on the latter page, I didn’t search for another page in the documentation that is devoted to GitHub handling.

        Cheers,
        Jan
          This message has been ROT-13 encrypted twice for higher security.
          • 28215
          • 4,149 Posts
          splittingred Reply #4, 16 years ago
          Done, thanks.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 8898
            • 181 Posts
            enigmatic_user Reply #5, 16 years ago
            Quote from: splittingred at Nov 04, 2010, 09:07 AM

            Done, thanks.
            Great - your rate of work is amazing! smiley

            Cheers,
            Jan
              This message has been ROT-13 encrypted twice for higher security.
              • 3749
              • 24,544 Posts
              Score one for my argument that we should have people clone the MODx repo rather than their forks. wink

              For people new to Git (which is almost everyone), it’s natural to assume that "origin" would point to the MODx Repo or that your fork at Github would be updated automatically to keep it in sync. with the MODx repo.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 8898
                • 181 Posts
                enigmatic_user Reply #7, 16 years ago
                Well, I didn’t assume anything, I just followed the steps described at http://rtfm.modx.com/display/revolution20/Git+Installation. wink As it seems, Shaun now corrected the instructions given there.

                Cheers,
                Jan
                  This message has been ROT-13 encrypted twice for higher security.
                  • 3749
                  • 24,544 Posts
                  That method is the one GitHub suggests and it matches all their examples, which is a big plus for it. It’s also consistent with many other projects and tutorials based on GitHub’s examples. I still have yet to see any reason why it’s superior, however. It has significant disadvantages, IMO, and some Git gurus suggest doing it the other way around and cloning the "blessed" repository rather than your fork.

                  Either way works fine, though, as long as the directions are accurate. wink
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 28215
                    • 4,149 Posts
                    splittingred Reply #9, 16 years ago
                    The way we have up there is how a GitHub consultant suggested to us. wink

                    The forking upstream/origin method is important, as this allows you to still contribute to the project via Pull Requests - but also keep up to date, by merging from upstream.
                      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com