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

Example of rewriting PR commits in draft mode before requesting proofreading #68

Open
wants to merge 9 commits into
base: tmp_2023-09-04-01
Choose a base branch
from

Conversation

dzc34
Copy link
Member

@dzc34 dzc34 commented Sep 19, 2023

PR source : https://github.com/demarches-simplifiees/demarches-simplifiees.fr/pull/9418/commits

Currently

Sélection_003

Proposal

Sélection_004

How do I do it?

# Update from remote repositories
git remote -v
git remote update -p
  # adullact	[email protected]:adullact/demarches-simplifiees.fr.git (fetch)
  # adullact	[email protected]:adullact/demarches-simplifiees.fr.git (push)
  # dinum	https://github.com/demarches-simplifiees/demarches-simplifiees.fr.git (fetch)
  # dinum	https://github.com/demarches-simplifiees/demarches-simplifiees.fr.git (push)

# Position yourself on the branch to be reworked
git checkout -b feature-ouidou/admin_creation_delegation adullact/feature-ouidou/admin_creation_delegation

# Cancel branch commits, but keep modifications in the workspace
git reset --mixed 2023-09-04-01

# Logically add files to multiple commits
git status
git add app/models/
git add db/migrate/
git add spec/models/
git commit -m "feat(gestionnaire): add new models (Gestionnaire and GroupeGestionnaire)"

git status
git add config/routes.rb
git add config/env.example.optional
git commit -m "feat(gestionnaire): add new super-admin routes"

git status
git add config/locales/
git commit -m "feat(gestionnaire): fill in i18n files"

git status
git add app/views/user_mailer/
git add app/views/groupe_gestionnaire_mailer/
git add app/mailers/
git add spec/mailers/
git commit -m "feat(gestionnaire): add mailers"

git status
git add app/controllers/manager/
git add app/dashboards/
git commit -m "feat(gestionnaire): add super-admin controllers"

git status
git add app/controllers/gestionnaires/
git add app/helpers/
git add app/views/
git commit -m "feat(gestionnaire): init  Gestionnaire page"

git status
git add spec/factories/
git commit -m "feat(gestionnaire): add missing spec"

git status
git add app/controllers/application_controller.rb
git commit -m "feat(gestionnaire): add gestionnaire to application_controller.rb"

git status
git add app/controllers/application_controller.rb
git commit -m "feat(gestionnaire): add gestionnaire to application_controller.rb"

git status
git add db/schema.rb
git commit -m "db: update schema.rb"

# Overwriting the remote branch with new commits
git push adullact --force feature-ouidou/admin_creation_delegation

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.

1 participant