Gluster blog stories provide high-level spotlights on our users all over the world
|A git workflow that always give you clean pull requests 🙂|
This post is for all you naughty folks out there who forked a github repo, hacked on master, and now are repenting because you have no way of clearly and efficiently sharing your hacks with the original (forked) repository.
If you had kept your master clean, you could branch it and easily issue a pull request !
When master is clean, you can create a clean feature branch from it and rapidly issue a pull request to the home repo. The diagram above represents this workflow.
Okay, so what if you already gunked up your local master? Well, then here is the approximate workflow you will follow.
Clone down your fork if you havent already:
git clone email@example.com:gluster/my-fork-parent-project.git my-fork
Add the upstream repository as a remote:
git remote add upstream firstname.lastname@example.org:gluster/parent-project.git
And finally, the magic part:
git fetch upstream
git checkout -b remote_master upstream/master
This creates a PURE copy of the remote master that you can use to branch off of for pull requests.
And now you can hack on “master” all you want… But, after this traumatic experience, I’m sure you will NEVER do THAT again :).
2020 has not been a year we would have been able to predict. With a worldwide pandemic and lives thrown out of gear, as we head into 2021, we are thankful that our community and project continued to receive new developers, users and make small gains. For that and a...
It has been a while since we provided an update to the Gluster community. Across the world various nations, states and localities have put together sets of guidelines around shelter-in-place and quarantine. We request our community members to stay safe, to care for their loved ones, to continue to be...
The initial rounds of conversation around the planning of content for release 8 has helped the project identify one key thing – the need to stagger out features and enhancements over multiple releases. Thus, while release 8 is unlikely to be feature heavy as previous releases, it will be the...