Skip to content

integrate guidance on rebase / merges (advanced) #20

@alee

Description

@alee

concepts

how to practice

Setup merge commits into feature branch

  1. create a new branch test-rebase
  2. add a few arbitrary commits to test-rebase
  3. switch to main and add commits there
  4. switch to test-rebase and merge main into test-rebase: $ git checkout test-rebase; git merge main
  5. add few more arbitrary commits to test-rebase
  6. use git rebase -i to clean up test-rebase

Use rebase to bring changes from main into a feature branch (assuming origin is your fork and upstream is the upstream repo)

  1. git fetch upstream
  2. git checkout feature-branch
  3. git rebase upstream/main - resolve conflicts if any

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions