Add a guide for rebasing and squashing PRs.#60
Add a guide for rebasing and squashing PRs.#60dilijev wants to merge 2 commits intomicrosoft:masterfrom
Conversation
| ```sh | ||
| (git:feature)$ git branch -m feature-saved # rename the current branch so that your work is saved | ||
| (git:feature-saved)$ git fetch upstream | ||
| (git:feature-saved)$ git checkout -B master upstream/master # forcibly check out a new copy of upstream/master |
There was a problem hiding this comment.
For this line, this is how I do it, because I never work in master and it doesn't bother me to do this "unsafe" operation that destroys the current copy of master, because it's faster and fewer commands. Is there a safer way to recommend doing this that gets master pointing to upstream/master without potentially introducing merge commits (like git pull would do if master contained commits not in upstream/master?)
sethbrenith
left a comment
There was a problem hiding this comment.
We might also want a link to this page somewhere in the "housekeeping" section of CONTRIBUTING.md, since that page is not part of the wiki and therefore wouldn't show the sidebar.
|
|
||
| # Getting started and creating a PR | ||
|
|
||
| Following the usual Git convention, the following examples assume the remote referring to your fork [username/ChakraCore](https://github.com/username/ChakraCore), which you cloned from, is named `origin`, and [Microsoft/ChakraCore](https://github.com/Microsoft/ChakraCore) is named `upstream`. |
There was a problem hiding this comment.
feels kinda weird to have a broken link to username/ChakraCore
There was a problem hiding this comment.
Good point. I'll unlink it and maybe write the URL as "code" like this:
https://github.com/<username>/ChakraCore
Good point |
Preview at https://github.com/Microsoft/ChakraCore-wiki/blob/b470bb214c141551a85d9ef30b798d356bbc782a/Rebasing-PRs.md