[GIT] Forking MP2 repository for development of new plugins (1 Viewer)

Vic Demented

Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    52
    Brugge, Belgium
    Home Country
    United States of America United States of America
    Next step should be following:
    Then I can step into skin creation. And I think I will make some comments on coding style and conventions ;)


    Having some trouble figuring that part out (new to git). When I try and check out the 'dev' branch, it returns a not found error.

    Oh and comment away on the style and conventions...
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,990
    7,376
    Home Country
    Germany Germany
    Last edited:

    Vic Demented

    Retired Team Member
  • Premium Supporter
  • March 4, 2013
    42
    25
    52
    Brugge, Belgium
    Home Country
    United States of America United States of America
    This is what the GIT client returns when I try and pull down the 'dev' branch

    git.exe pull -v --progress "https://github.com/VicDemented/MediaPortal-2/tree/dev/" master

    fatal: https://github.com/VicDemented/MediaPortal-2/tree/dev/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

    git did not exit cleanly (exit code 1) (2215 ms @ 3/12/2013 9:43:00 AM)[DOUBLEPOST=1363099491][/DOUBLEPOST]^^^ was posted before I read your reply...I will follow those instructions.
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    Infos and guide move to wiki: http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/Contribute/Development/2_Git/Forking_MP2

    So I guess you cloned your repository before like morpheus suggested and explained in wiki: http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/Contribute/Development/2_Git
    Code:
    git.exe clone	--progress -v  "git@github.com:VicDemented/MediaPortal-2.git" "%path_to_wherever_you_want_to_have_it%\MediaPortal-2"

    To switch to dev-branch directly while cloning, you also could use:
    Code:
    git.exe clone	--branch dev --progress -v  "git@github.com:VicDemented/MediaPortal-2.git" "%path_to_wherever_you_want_to_have_it%\MediaPortal-2"

    To update your local clone with latest data (commits, branches, ...), it is recommended to use fetch instead. (iirc, pull is something like fetch&merge, please google for more infos about it).

    When fetching I always select "Prune" to get rid of references to branches, which have already been deleted on the remote server (online git).
    Code:
    git.exe fetch -v --progress --prune  "VicDemented"
    instead of VicDemented, might have to use "origin".

    In example I've set up one MediaPortal-2 clone and I am able to multiple remotes (repositories) for push/pull/fetch etc and I am able to switch between branches from our official MP2 repo to mine or to a branch of yours without any need to create a new clone: My setup in TortoiseGIT:
    20130312_164025.png


    Here is my menu when fetching latest online data:
    20130312_164357.png

    Here is the window to switch branches:
    Red = my local branches
    blue = remote branches in my own fork
    green = remote branches in MP2 official repo (origin)
    yellow = remote branches in your fork
    20130312_164543.png

    20130312_164635.png
     
    Last edited:

    Users who are viewing this thread

    Top Bottom