Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
files=$(git diff --cached --name-only | grep '\.jsx\?$') | |
# Prevent ESLint help message if no files matched | |
if [[ $files = "" ]] ; then | |
exit 0 | |
fi | |
failed=0 | |
for file in ${files}; do |
const storyFiles = require.context('../src', true, /__stories__\/.+\.js$/) | |
const sources = require.context('!!raw-loader!../src', true, | |
/__stories__\/.+\.js$/) | |
const readme = require.context('!!raw-loader!../src', true, /README\.md$/) | |
const READMES = readme.keys().reduce((memo, key) => { | |
const [,baseName] = key.match(/^\.\/([^\/]+)\//) | |
memo[baseName] = readme(key) | |
return memo | |
}, {}) |
window.__testCleanup = () => { | |
const unregisterSW = () => { | |
return navigator.serviceWorker.getRegistrations() | |
.then((registrations) => { | |
const unregisterPromise = registrations.map((registration) => { | |
return registration.unregister(); | |
}); | |
return Promise.all(unregisterPromise); | |
}); | |
}; |
const timing = store => next => action => { | |
performance.mark(`${action.type}_start`); | |
let result = next(action); | |
performance.mark(`${action.type}_end`); | |
performance.measure( | |
`${action.type}`, | |
`${action.type}_start`, | |
`${action.type}_end` | |
); | |
return result; |
const db = [ | |
{ | |
name: 'John Doe', | |
age: 28, | |
lastModified: Date.now(), | |
lastAccessed: Date.now() | |
}, | |
{ | |
name: 'Jane Smith', | |
age: 30, |
Thought I'd post my React Conf notes here for anyone who is interested!
-
New! Prerelease channels: In order to support other library and framework devs, and to enlist early feedback, the React team is debuting 3 new prerelease channels: Latest (stable), Next (on-deck for stable release, but doesn't adhere to semver and may intro breaking changes), and Experimental (caution! likely to contain large and breaking changes). Latest is the only channel recommended for user-facing applications.
-
New! Experimental release of Concurrent Mode: Concurrent Mode supports interruptible rendering, including suspending render in components whose data has not yet returned (Suspense API). I got a glimpse of SuspenseList in action in the context of rendering a list of photos from a remote source and it was pretty neat - I think there's a lot to be excited for here, especially for mobi