github_rebase.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ******************************
  2. Rebasing a branch with GitHub
  3. ******************************
  4. Welcome to the rebasing a branch with GitHub guide.
  5. **1.** Open the GitHub client application and make sure you are on the branch you want to rebase
  6. .. image:: ../_static/images/contributing/github_rebase_1.png
  7. Select the setting icon and choose Open on Git Shell
  8. .. image:: ../_static/images/contributing/github_rebase_2.png
  9. You will be presented with a new shell
  10. .. image:: ../_static/images/contributing/github_rebase_new_shell.png
  11. **2.** Next execute the following two commands and notepad will appear
  12. ::
  13. git fetch --all
  14. git rebase --ignore-date --interactive fusionpbx/master
  15. |
  16. change the first commit to reword and the following commit(s) to fixup (similar to screenshot below)
  17. .. image:: ../_static/images/contributing/github_rebase_3.png
  18. Close and save the text, next it will pop up another notepad for the commit message.
  19. Enter the commit title on the first line, leave a line blank and enter the commit message (similar to screenshot below)
  20. .. image:: ../_static/images/contributing/github_rebase_4.png
  21. Close and save the text again.
  22. **3.** Switch back to the github client and switch between history/changes to make it update and check it has done what you want.
  23. .. image:: ../_static/images/contributing/github_rebase_5.png
  24. **4.** If the changes are correct switch back to the git shell and execute this to push the changes
  25. ::
  26. git push --force-with-lease
  27. exit
  28. |
  29. All done!