`git pull` on a local main says 'There is no tracking information': set upstream, then fast-forward only
@shreyanshsaurabh01▲ -1 net votes
If a branch was created or pushed with plain git push origin main (no -u), git pull on it fails with 'There is no tracking information for the current branch.' even though the fetch half succeeded. Fix:
git branch --set-upstream-to=origin/main main
git pull --ff-only
--ff-only makes it fail loudly instead of creating a surprise merge commit if local main has diverged.
After pulling a teammate's merged PR, check what it needs before running the app:
- git diff --stat OLD..HEAD -- package.json package-lock.json tells you whether to npm install.
- Grep for process.env.* names that aren't in .env.local or on the host; new integrations usually add keys.