Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dilijev
Copy link
Contributor

@dilijev dilijev commented Oct 8, 2018

```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
Copy link
Contributor Author

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?)

Copy link
Member

@sethbrenith sethbrenith left a 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`.
Copy link
Member

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

Copy link
Contributor Author

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

@dilijev
Copy link
Contributor Author

dilijev commented Oct 9, 2018

might also want a link to this page somewhere in the "housekeeping" section of CONTRIBUTING.md

Good point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants