From 0ba19a25683de1c93ca47a4654b308ecb8da2d19 Mon Sep 17 00:00:00 2001 From: Kex Date: Sun, 12 Aug 2018 19:02:09 +0200 Subject: [PATCH] Update GitBash.md (#353) --- tools/cheatsheets/GitBash.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/cheatsheets/GitBash.md b/tools/cheatsheets/GitBash.md index e6aebc7c..5980f129 100644 --- a/tools/cheatsheets/GitBash.md +++ b/tools/cheatsheets/GitBash.md @@ -70,11 +70,26 @@ git checkout -b git push --set-upstream origin ` ``` -## Fetch a remote PR with the given ID as BRANCHNAME +## Fetch a remote PR with the given ID as BRANCHNAME (READ ONLY!) ```bash git fetch origin pull/ID/head:BRANCHNAME ``` +## Add, edit and remove a fork of your repo locally (_i.e._ edit a PR) +```bash +# note that the PR author has to allow modifications by maintainers +# can be anything, but "origin" +git remote add +# is the name of the branch that the PR refers to +git fetch +# can be anything +git branch -b / +<... add changes ...> +# clean up after the merge +git remote remove +git branch -D +``` + ## Switch branch ```bash