getsolus / help-center-docs

Solus's Help Center documentation as well as previous User Guide.
https://help.getsol.us
GNU General Public License v2.0
57 stars 83 forks source link

Additions to git tips & tricks - recover from a botched PR job #574

Open TraceyC77 opened 1 month ago

TraceyC77 commented 1 month ago
git fetch
gh pr checkout $PR_ID
git rebase origin/master
# Deal with conflicts
git push --force

OR

git checkout master && git pull
git cherry-pick $COMMIT_ID # get this from the PR
# Fix conflicts
git push
# Go back to PR and manually close it using the commit on master

OR (when the branch lives outside of the getsolus org)

git checkout master && git pull
gh pr checkout $PR_ID
git log # get the commit ID
git checkout master
git cherry-pick $COMMIT_ID
# Deal with conflicts
git push