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

Missing documentation about how to combine a series of GitHub commits into one commit #450

Open
1 task
shmonks opened this issue Nov 21, 2024 · 0 comments
Open
1 task
Labels
complexity: small Small changes with all steps laid out in detail; new member can complete in <1.5 hours feature: docs: PD team documentation documentation on PD team processes and architecture, etc. role: back end role: dev s: PD team stakeholder: People Depot Team size: 0.25pt Can be done in 1.5 hours or less

Comments

@shmonks
Copy link
Member

shmonks commented Nov 21, 2024

Overview

We are striving to write documentation that helps developers on our team and our stakeholders' teams work smoothly and successfully.

We need to add information about how to combine a series of GitHub commits, so that the PR process is simplified and migration conflicts are more easily dealt with.

Documentation Notes

What's missing?

This is a quick way of combining a series of GitHub commits into one:

  1. Assume we're at the head of the PR branch with 4 commits and want to combine the 4 commits into one.
  2. Soft reset to the earliest commit, with all the changes of the later commits staged.
    git reset --soft Head~3
  3. Amend the staged changed into the earliest commit.
    git commit --amend --no-edit
    note: omit the --no-edit flag if you want to edit the commit message.

Although there are other ways of combining GitHub commits (like lazygit and the standard interactive rebase), these are more interactive than the process described above and therefore more difficult to describe in text form.

Where would this information have been useful?

  • https://github.com/hackforla/peopledepot/pull/398/commits contained 4 commits, which were then merged into one before rebasing it to main, in order to make it easier to work with.
  • This info could be useful when dealing with PRs that need to be rebased to upstream/main, especially when there are also migration conflicts in which more than one commit in the PR contains migration files. If the PR commits are all merged into one, the migration conflicts can be simplified along with the repetitive need to resolve merges.

Which roles will benefit most from this information?

  • Backend
  • Dev

Action Items

  • Add the information in the Documentation Notes section above to the relevant /docs/contributing/ sub-folder listed in Resource 1.01 below.

Resources/Instructions/Tags

  • 1.01 The contributing docs should go inside the /docs/contributing/ folder or sub-folders
    • howto guides --> /docs/contributing/howto/
    • tutorials --> /docs/contributing/tutorial/
  • 1.02 Tag: git
@github-project-automation github-project-automation bot moved this to 🆕New Issue Review in P: PD: Project Board Nov 21, 2024
@shmonks shmonks added complexity: small Small changes with all steps laid out in detail; new member can complete in <1.5 hours size: 0.25pt Can be done in 1.5 hours or less role: back end role: dev ready for dev lead and removed complexity: missing size: missing role: missing labels Nov 22, 2024
@shmonks shmonks added this to the 05. Team Workflow milestone Nov 22, 2024
@shmonks shmonks changed the title Add missing documentation about how to combine a series of GitHub commits into one commit Missing documentation about how to combine a series of GitHub commits into one commit Jan 24, 2025
@shmonks shmonks moved this from 🆕New Issue Review to 📋Prioritized Backlog in P: PD: Project Board Jan 24, 2025
@shmonks shmonks added the s: PD team stakeholder: People Depot Team label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: small Small changes with all steps laid out in detail; new member can complete in <1.5 hours feature: docs: PD team documentation documentation on PD team processes and architecture, etc. role: back end role: dev s: PD team stakeholder: People Depot Team size: 0.25pt Can be done in 1.5 hours or less
Projects
Status: 📋Prioritized Backlog
Development

No branches or pull requests

1 participant