Integration-Manager Workflow and Rebasing Sign in on the attendance - - PowerPoint PPT Presentation

integration manager workflow and rebasing
SMART_READER_LITE
LIVE PREVIEW

Integration-Manager Workflow and Rebasing Sign in on the attendance - - PowerPoint PPT Presentation

Lecture 8 Integration-Manager Workflow and Rebasing Sign in on the attendance sheet! Remember the Centralized Workflow? Problem: Every developer needs push access to the shared repository! Integration-Manager Workflow Github/ The cloud


slide-1
SLIDE 1

Lecture 8 Integration-Manager Workflow and Rebasing

Sign in on the attendance sheet!

slide-2
SLIDE 2

Remember the Centralized Workflow?

Problem: Every developer needs push access to the shared repository!

slide-3
SLIDE 3

Integration-Manager Workflow

Local Computer Github/ “The cloud”

slide-4
SLIDE 4

Step 1. Fork the public repository

(make your own public copy)

slide-5
SLIDE 5

Step 1. Fork the public repository

Blessed Repository Developer Public Repository

slide-6
SLIDE 6

Step 2. Clone your public repository

$ git clone https://github.com/aperley/Autolab.git

Blessed Repository Developer Public Repository Developer Private Repository

slide-7
SLIDE 7

Step 3. Create a feature branch and make some commits

$ git checkout -b my-feature $ <do some work> $ git commit -am "add my feature" Then push your feature branch to your public repository $ git push origin my-feature

Developer Public Repository Developer Private Repository

slide-8
SLIDE 8

Step 4. Create a pull request

slide-9
SLIDE 9

The integration manager can inspect and pull in in your changes

As the integration manager: $ git remote add aperleys-fork https://github.com/aperley/Autolab.git $ git checkout aperleys-fork/my-feature If it looks good: $ git checkout master $ git merge aperleys-fork/my-feature $ git push origin master

slide-10
SLIDE 10

The integration manager can inspect and pull in in your changes

Developer Public Repository Developer Private Repository Integration Manager Repository Blessed Repository

slide-11
SLIDE 11

You need to keep your fork up to date

In the private developer repo $ git remote add upstream https://github.com/autolab/Autolab.git $ git fetch upstream $ git checkout master $ git merge upstream/master $ git push origin master

slide-12
SLIDE 12

You need to keep your fork up to date

Developer Public Repository Developer Private Repository Integration Manager Repository Blessed Repository

slide-13
SLIDE 13

Git Rebase: Squashing Commits

X X ✔

slide-14
SLIDE 14

Squashing Commits

Scenario: Made some commits on a feature branch but want to “clean it up” before making a pull request or merging to master

slide-15
SLIDE 15

Squashing Commits

$ git rebase -i master Begins an interactive rebase of all of the commits since the branch split

  • ff of master.
slide-16
SLIDE 16

Interactive Rebase

slide-17
SLIDE 17

Decide what you want to squash onto the commit above (before)

slide-18
SLIDE 18

Now we need to edit the commit message for the first squash group

slide-19
SLIDE 19

Same for the second squash group

slide-20
SLIDE 20

We are left with a new commit history

slide-21
SLIDE 21

What happened?

We rewrote history by replaying the patches for each commit

Base Commit Implement Feature Bugfix Spelling fix Add tests Fix a test Base Commit Implement feature and bugfix and spelling fix Add tests