Merging and Rebasing

Rebases 'feature' to 'master' and merges it in to master

git rebase master feature && git checkout master && git merge -

Stash changes before rebasing

git rebase --autostash

Squash fixup commits normal commits.

git rebase -i --autosquash

Change previous two commits with an interactive rebase.

git rebase --interactive HEAD~2

Find common ancestor of two branches

git merge-base <branch-name> <other-branch-name>

Change a branch base

git rebase --onto <new_base> <old_base>

results matching ""

    No results matching ""