-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a guide for rebasing and squashing PRs. #60
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels kinda weird to have a broken link to username/ChakraCore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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