Last active
May 8, 2019 20:23
-
-
Save pepasflo/b1c849002951a644588c019f45a0be01 to your computer and use it in GitHub Desktop.
Revisions
-
pepasflo revised this gist
May 8, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Now, while waiting for that PR to be approved, if you need to continue making mo - `git push origin` - go to github.com and make a PR The key difference is that on github.com you'll change the "base" from `develop` to `OTT-217-cake` when creating the second PR. ## Merging the first PR -
pepasflo revised this gist
May 8, 2019 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,8 @@ Create your first PR as per normal: - `git checkout -b OTT-217-cake` - edit some files - `git add .` - `git commit -m "OTT-217 Add some cake to the fridge"` - `git push origin` - go to github.com and make a PR @@ -26,8 +26,8 @@ Now, while waiting for that PR to be approved, if you need to continue making mo - `git checkout -b OTT-218-more-cake` - edit some files - `git add .` - `git commit -m "OTT-218 Add another cake to the fridge"` - `git push origin` - go to github.com and make a PR The key difference is that on github.com you'll change the "base" from `develop` to `OTT-217-cake` when creating the PR. -
pepasflo created this gist
May 8, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ # Stacked-PR workflow Some notes about how I work with stacked branches (a.k.a. dependent PR's). Kindof a pain but it works. This could probably be automated with some clever scripting against github's API. ## Creating the first PR Create your first PR as per normal: - (assuming you are currently in the `develop` branch) - `git checkout -b OTT-217-cake` - edit some files - `git add .` - `git commit -m "OTT-217 Add some cake to the fridge" - `git push origin - go to github.com and make a PR ## Creating the second PR Now, while waiting for that PR to be approved, if you need to continue making more changes, proceed as per usual except you'll be branching off of your existing branch, rather than branching off of `develop`. - (assuming you are currently in the `OTT-217-cake` branch) - `git checkout -b OTT-218-more-cake` - edit some files - `git add .` - `git commit -m "OTT-218 Add another cake to the fridge" - `git push origin - go to github.com and make a PR The key difference is that on github.com you'll change the "base" from `develop` to `OTT-217-cake` when creating the PR. ## Merging the first PR Click the "squash and merge" button on github.com, then "unstack" your second PR: - `git checkout develop` - `git pull` - `git checkout OTT-218-more-cake` - `git rebase develop` - `git push --force` Then go to the second PR in github.com and change the "base" to `develop`. ## Merging the second PR Click the "squash and merge" button on github.com.