Originally, each of Atom's core packages resided in a separate repository. In 2018, in an effort to streamline the development of Atom by reducing overhead, the Atom team consolidated many core Atom packages into the atom/atom repository. For example, the one-light-ui package was originally maintained in the atom/one-light-ui repository, but it is now maintained in the packages/one-light-ui
directory in the atom/atom repository.
If you forked one of the core packages before it was moved into the atom/atom repository, and you want to continue merging upstream changes into your fork, please follow the steps below.
For the sake of this guide, let's assume that you forked the atom/one-light-ui repository, renamed your fork to one-light-ui-plus
, and made some customizations.
Navigate to your local clone of your fork:
cd path/to/your/fork
Add the atom/atom repository as a git remote:
git remote add upstream https://github.com/atom/atom.git
Tip: Follow these steps each time you want to merge upstream changes into your fork.
Fetch the latest changes from the atom/atom repository:
git fetch upstream
Identify recent changes to the core package. For example, if you're maintaining a fork of the one-light-ui package, then you'll want to identify recent changes in the packages/one-light-ui
directory:
git log upstream/master -- packages/one-light-ui
8ac9919a0 Bump up border size (Hugh Baht, 17 minutes ago)
3bf4d226e Remove obsolete build status link in one-light-ui README (Jason Rudolph, 3 days ago)
3edf64ad0 Merge pull request #42 from atom/sm-select-list (simurai, 2 weeks ago)
...
Look through the log and identify the commits that you want to merge into your fork.
For each commit that you want to bring into your fork, use git format-patch
in conjunction with git am
. For example, to merge commit 8ac9919a0
into your fork:
git format-patch -1 --stdout 8ac9919a0 | git am -p3
Repeat this step for each commit that you want to merge into your fork.