Applying Upstream Updates
After running composer create-project, your application is an independent Git repository with no connection to the starter. When the starter ships fixes or new features, you can optionally cherry-pick those commits into your project.
Knowing When Updates Are Available
Section titled “Knowing When Updates Are Available”Watch the starter’s repository on GitHub for releases (Watch → Custom → Releases) and GitHub notifies you of each one. Every release links to its section of the changelog.
The version your project started from is the newest one in the CHANGELOG.md that composer create-project gave you; note it before you replace that file with your own. To see everything the starter has changed since then, compare it with main, putting your version in place of v3.0.0:
https://github.com/NIT-Administrative-Systems/northwestern-laravel-starter/compare/v3.0.0...mainAdd the starter as a Git remote (one-time):
git remote add starter https://github.com/NIT-Administrative-Systems/northwestern-laravel-starter.gitgit fetch starterCherry-Picking Commits
Section titled “Cherry-Picking Commits”-
Fetch the latest starter commits
Terminal window git fetch starter -
Review what’s changed
Browse the starter’s commit log to find the commits you want:
Terminal window git log starter/main --oneline -
Cherry-pick specific commits
Apply individual commits to your current branch:
Terminal window git cherry-pick <commit-hash>Or apply a range of commits:
Terminal window git cherry-pick <oldest-hash>^..<newest-hash> -
Resolve any conflicts
If the cherry-pick encounters conflicts (because your project has diverged), Git will pause and let you resolve them:
Terminal window # Review conflictsgit status# Fix conflicting files, then continuegit add .git cherry-pick --continueIf a commit doesn’t apply cleanly and isn’t worth the effort, you can skip it and move on to the next one in the range:
Terminal window git cherry-pick --skipTo give up on the whole cherry-pick instead, run
git cherry-pick --abort. It returns the branch to where it was before you started, dropping any commits from the range that were already applied.
- Review the release notes first. The comparison between your version and the latest release shows exactly what changed. Some commits may depend on others or require configuration changes.
- Cherry-pick in order when applying multiple related commits. Applying them out of sequence increases the likelihood of conflicts.
Alternative: Patch Files
Section titled “Alternative: Patch Files”If you prefer not to add the starter as a remote, you can apply changes from patch files:
# In a clone of the starter repo, generate patchesgit format-patch <from>..<to> --stdout > upstream-fix.patch
# In your project repo, apply the patchgit am upstream-fix.patch