Suggest changes with a Github Pull Request: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
(Created page with "= Suggest changes with a Github Pull Request = Pretty straight forward, but anyways, here is one way to do it: * Create a new branch (or fork, if it is not your repo) ** Eit...")
 
No edit summary
 
Line 4: Line 4:


* Create a new branch (or fork, if it is not your repo)
* Create a new branch (or fork, if it is not your repo)
** Either on github pages Code tab: enter a new branch name, then pull (or clone) the repo
** Either: On github pages Code tab:  
** Or create the branch in your local git repo (not tested yet)
*** Enter a new branch name
* Switch to the new branch in your local repo (git checkout new-branch-name)
*** Pull (or clone) the repo
** use -m option, if you already have local changes that should go into the new branch
*** Switch to the new branch in your local repo (git checkout new-branch-name)
** Or: Create the branch in your local git repo (git checkout -b new-branch-name)
*** use -m merge option, if you already have local changes that should go into the new branch
*** use -p patch option, to interactively select local changes to discard or reuse
* Make changes, commit, push
* Make changes, commit, push
* On github create a pull request, selecting the new branch (or fork) with the changes
* On github create a pull request, selecting the new branch (or fork) with the changes
* If there is a github issue for that change, you can mention the pull request there with #pull-request-number
* If there is a github issue for that change, you can mention the pull request there with #pull-request-number
* If satisfied with the changes, merge pull request on the github page
* If satisfied with the changes, repo owner can merge the pull request on the github page

Latest revision as of 12:43, 19 August 2019

Suggest changes with a Github Pull Request

Pretty straight forward, but anyways, here is one way to do it:

  • Create a new branch (or fork, if it is not your repo)
    • Either: On github pages Code tab:
      • Enter a new branch name
      • Pull (or clone) the repo
      • Switch to the new branch in your local repo (git checkout new-branch-name)
    • Or: Create the branch in your local git repo (git checkout -b new-branch-name)
      • use -m merge option, if you already have local changes that should go into the new branch
      • use -p patch option, to interactively select local changes to discard or reuse
  • Make changes, commit, push
  • On github create a pull request, selecting the new branch (or fork) with the changes
  • If there is a github issue for that change, you can mention the pull request there with #pull-request-number
  • If satisfied with the changes, repo owner can merge the pull request on the github page