Skip to content

Steps to create a patch

s1n edited this page Sep 13, 2010 · 15 revisions

How to create a patch for Rakudo via git if you aren’t a committer

1) make your own fork on github.com

  • go to github.com
  • create a new account for yourself
    – follow their instructions to add your SSH key
  • go to http://github.com/rakudo/rakudo/
  • click “fork”
  • at your command line, make a checkout:
    git clone git@github.com:[username]/rakudo.git
    and replace “[username]” with your github.com user name
  • git remote add upstream git://github.com/rakudo/rakudo.git

2) make a brach of your fork

  • git branch [branch-name]
  • git checkout [branch-name]

3) do work and commit

  • hack, hack, hack
  • git status
  • git diff
  • git add [name-of-file(s) you changed]
  • git commit

4) push the new branch to github.com

  • git push origin [branch-name]:[remote-branch-name]
    where you probably want the remote branch name to be the same
    as the local branch name
  • after that, you can just “git push” subsequent commits
  • On http://github.com/[username]/rakudo find “all branches” and select your branch name to see what you pushed up

5) later, pull more changes from upstream

  • git pull upstream master

if changes upstream conflict, you may need to rebase (and manually merge):

  • git pull —rebase upstream master
  • git pull —rebase origin [branch-name]

if merge conflicts persist, you will need to resolve it manually:

  • git rebase —skip
  • git pull upstream
  • edit file or manually merge your fixes into it

Clone this wiki locally