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 better squash instructions #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akotlar
Copy link
Collaborator

@akotlar akotlar commented Jan 30, 2024

No description provided.

@akotlar akotlar force-pushed the feature/better-squash-instructions branch 3 times, most recently from fdcf160 to b4f3e98 Compare January 30, 2024 02:20
@akotlar akotlar requested a review from dlin30 January 30, 2024 02:21
@akotlar akotlar force-pushed the feature/better-squash-instructions branch 2 times, most recently from eaf18b9 to 1e97968 Compare January 30, 2024 02:32
@akotlar akotlar force-pushed the feature/better-squash-instructions branch from 8bdb523 to 0c5874f Compare January 30, 2024 02:35
@@ -23,7 +23,7 @@ git checkout -b feature/some_feature
git commit -a -m "Addresses issue #NNN".

# Push to the remote repository, explicitly telling git that the remote repository you want to push to is "origin" (the foobar fork).
git push --set-upstream origin feature/some_feature
git push --set-upstream origin feature/999
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no longer matches the example on line 19 - do you want it to say 999 up there as well?

@@ -74,35 +74,63 @@ git pull upstream refs/pull/999/head
# Pull Request Etiquette
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section should go before 'Reviewing pull requests.' It's a little bit confusing to follow making another branch called pr_999 and then going back to the feature/999 one. Having everything grouped for what to do for one's own branch and then for someone else's work I think would be easier to follow.

```

- This will ensure that git history remains clean, while still allowing you to commit frequently during development.
If you have already created a branch from feature/999, which was just squashed, you can bring a child branch (feature/1000) up to date by:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would also add another subheading here, to indicate this section is just about child branches. I think the only part that really relates to etiquette is really lines 75 and 76, so maybe a subheading to indicate the different procedures would be useful. Like if line 79 had a subheading with something like 'How to maintain 1 commit per PR' for instance.


This will ensure that git history remains clean, while still allowing you to commit frequently during development.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would add some kind of wrap up statement at the end. Maybe add some kind of contact information if they have questions, that sort of thing.


If you now want to squash the commits that are exclusive to feature/1000:
```sh
# Checkout the child branch (feature/1000), and bring it up to date with the changes in the parent branch (feature/999)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to mention or clarify that squashing of the parent is not required before this part, worded something like: Whenever you want to bring the child branch up to date

And that you'll have to resolve conflicts and commit it before continuing the procedure.

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