Public
Authored by fr500

How to rebase cleanly instead of adding stray commits every time

$ git push
ERROR: Permission to libretro/snes9x.git denied to fr500.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Since I can't push anymore I guess I have to document stuff before someone screws upstreaming efforts again

How many times do I have to explain this stuff? It's not that hard!

The general idea is to keep master clean, untouched, identical to upstream, and add a branch for libretro stuff. Particularly in case of different version control.

Edited
rebase.md 582 Bytes
  • VBA-M

    Add upstream repo:

    git remote add upstream git@github.com:visualboyadvance-m/visualboyadvance-m.git
    git fetch upstream

    Update repo:

    git fetch upstream
    git rebase upstream/master
    git push -f

    Build:

    cd /src/libretro
    make
    Edited by fr500
  • Dosbox-SVN

    Clone the SVN repo, keep master untouched and rebase master changes on libretro branch.

    Clone repo:

    git svn clone https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk dosbox-svn

    this may fail, even more than one time, if it does:

    cd dosbox-svn
    git svn fetch
    git svn rebase

    until you get the last commit

    cd dosbox-svn
    git remote add origin git@github.com:fr500/dosbox-svn.git
    git fetch origin
    git checkout origin/libretro
    git rebase master

    Update repo:

    git checkout master
    git svn rebase
    git checkout libretro
    git rebase master
    cd libretro
    ./update_version.sh
    git commit -a --amend -m"update version"
    git push -f

    Build:

    git checkout libretro
    make
    Edited by fr500
  • Blastem

    Clone the mercurial repo, keep master untouched and rebase master changes on libretro branch. Setup git remote hg https://github.com/felipec/git-remote-hg

    Clone repo:

    git clone hg::https://www.retrodev.com/repos/blastem/ blastem
    cd blastem

    Add libretro repo:

    git remote add downstream git@github.com:libretro/blastem.git
    git fetch downstream

    Since someone fucked this one up already:

    git checkout libretro
    git reset --hard master
    git cherry-pick 00bf24fac280b0d251b9df82d0da77046440c018
    git push -f

    Update from upstream:

    git fetch origin
    git checkout master
    git rebase origin/master
    git checkout libretro
    git rebase master
    git push downstream -f

    Build

    git checkout libretro
    make -f Makefile.libretro
    Edited by fr500
  • Snes9x:

    Add upstream repo:

    git remote add upstream https://github.com/snes9xgit/snes9x.git
    git fetch upstream

    Update repo:

    git fetch upstream
    git rebase upstream/master
    git push -f 

    Build:

    cd libretro
    make
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment