Downtown Magazine

Downtown Magazine. Hope everyone had a wonderful 4th of July. Mine was extra special as I opened my newspaper to a surprise — my face on a full spread!.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Stacked Pull Requests on Github

The first step is to install git-town with is a workflow layer on top of vanilla git. It makes creating stacked pull requests incredibly simple and has some additional functionality for keeping your stack of PRs in sync.

This will pull in latest changes from origin/main and create a new branch off of it.

Next, make some changes to your code, and commit them:

Then, use git town to create a new pull request:

This will sync your local branch to github and open the new PR creation in your browser.

The workflow is the exact same as above, except you use git town append :

….same as #3

Once you have done this, you’ll have a stack of pull requests:

If you look at the first PR the upstream branch is main :

But the subsequent PRs are now stacked on top of this one:

Once your code is reviewed, you can start merging. Once you have merged a parent branch and deleted it, github will automatically rebase the PR on top of main.

Branches are automatically rebased to main upon it’s parent base branch being deleted.

That’s it!

This is where the git-town workflow tool really shines.

Continuing with our example above, say you have changes to make to the first:

To make sure every single branch in your stack receives these changes, just checkout the last branch in your pull request, and run git town sync

That’s it! 💯

Add a comment

Related posts:

Did the Los Angeles Clippers Just Save the Entire NBA?

The Los Angeles Clippers convinced Kawhi Leonard to join them instead of the Lakers, and that saved the entire NBA… or did it? The Lakers are more screwed than you think, and the Clips are way better.

State Design Pattern

Summary information about State Design Pattern. “State Design Pattern” is published by Yigit Can Turk.

GitHub Project Workflow for Multiple Collaborators

Now into phase 4 of my Bootcamp and I have collaborated with a few people on projects. We are given suggestions for things to do when working on projects, but no clear workflow to follow so with each…