lecture 8 integration manager workflow and basic rebasing
play

Lecture 8 Integration Manager Workflow and Basic Rebasing Last Time - PowerPoint PPT Presentation

Sign in on the attendance sheet! Lecture 8 Integration Manager Workflow and Basic Rebasing Last Time Remote tracking branches Introduced centralized Git workflow Made a pull request Github/ The cloud Local Computer Today


  1. Sign in on the attendance sheet! Lecture 8 Integration Manager Workflow and Basic Rebasing

  2. Last Time • Remote tracking branches • Introduced centralized Git workflow • Made a pull request Github/ “The cloud” Local Computer

  3. Today • What happens when we merge pull requests • How we keep our fork up to date • What is rebase and what does it have to do with any of this?

  4. Merging a Pull Request on Github • Pull request into blessed-repo:master from remote-repo:my-feature • Clicking the merge pull request button is equivalent to executing the following commands in the blessed-repo repository itself: Note that we can’t actually execute commands in the remote repository but Github can $ git checkout master $ git remote add remote-repo https://github.com/user/remote-repo.git $ git fetch remote-repo $ git merge --no-ff remote-repo/my-feature Must merge cleanly! PR interface will not allow merge until conflicts are resolved

  5. The integration manager can inspect and pull in in your changes Developer Blessed Public Repository Repository Integration Developer Manager Private Repository Repository

  6. Merging a Pull Request Manually • Pull request into blessed-repo:master from remote-repo:my-feature • In the “integration manager’s” clone of blessed -repo: $ git checkout master $ git pull $ git remote add remote-repo https://github.com/user/remote-repo.git $ git fetch remote-repo $ git merge --no-ff remote-repo/my-feature $ git push origin master

  7. You need to keep your fork up to date Developer Blessed Public Repository Repository Integration Developer Manager Private Repository Repository

  8. 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

  9. Rebasing • Rebasing rewrites your git history, replaying the diffs of your commits • Useful as an alternative to merging when you want to keep history neat

  10. Merge vs. Rebase HEAD E' feature HEAD HEAD M master C' HEAD HEAD E feature E feature HEAD HEAD D master D master C C B B A A git rebase master git merge feature

  11. Activity/Homework Rebase the changes you made a PR for last week on top of the new upstream/master and push to your branch. Your PR should update automatically.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend