Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

How to submit patch

windyuan edited this page Apr 13, 2015 · 6 revisions
  1. Watch libxcam project
    go to https://github.com/01org/libxcam, and hit 'watch'.
    Then you can receive any others commit/comments
  2. Fork libxcam to your own account, hit 'fork'
  3. Get libxcam code to local.
    git clone [email protected]:user/libxcam.git
  4. Add 'upstream' for rebase
    git remote add upstream https://github.com/01org/libxcam.git
    git fetch upstream
  5. Edit patch.
  6. Format patch before commit.
    ./code_style.sh
    git commit -m "xxxx"
  7. Rebase with upstream
    git fetch upstream
    git rebase upstream/master
    If failed, fix conflicts first.
  8. Push commit to your account.
    git push origin
  9. Go to github home, create 'pull request'
  10. Wait for review, If accepted, maintainer would merge to upstream; else, continue edit patch
  • Every time, before edit source code, run
    git fetch upstream
    git rebase upstream

  • If there's conflicts but you are sure can be fixed. try to edit conflict files, then
    git add xxxx # xxxx means conflict files
    git rebase --continue

  • If maintainer fixed your patch. Try
    git fetch upstream
    git format-patch -2 #backup your local patches, 2 means there are 2 local patches to backup
    git reset --hard upstream/master # be careful of --hard, this may reset all your local patches. that's why need to backup at first
    git am 000*.patch # to restore you local patches, if there's conflicts, try to fix.