Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

  • Rebase your development branch with new changes from the golden repository's master. 'upstream/master' is the remote tracking branch for the golden repository's (upstream's) master branch, on your local machine:

git checkout <dev branch>

git rebase upstream/master

  • If there are conflicts, Git will throw an error message informing you so and ask you to resolve it before continuing the rebase.  Resolve conflicts the same way you resolve an ordinary merge conflict in Git. Here's a way to resolve conflicts from the command line.  Then, just continue the rebase operation:

git rebase --continue

  • If the conflict is complex or problematic, you can abort the current rebase operation instead of continuing, and come back to it later:

git rebase --abort

  • After the rebase is complete, you might want to clean up your branch's commit history:
  • Squash all your commits into ONE SINGLE COMMIT.

git checkout <dev branch>

git rebase -i --fork-point master

  • Write a meaningful commit message for your commit while doing the squash above. You can also use git commit --amend or rebase if you'd rather do it separately.  A good commit message is important because it will also be the title of your pull request.
  • OPTIONALLY sign your commit with the GPG key you configured earlier in the setup stage.

    git commit -S --amend

    If you would rather not have to remember this step, you might choose to develop the habit of signing all your commits at all times. If you use Git v2.0+, you can also set up automatic signing.

  • No labels