# Check what main changed before pulling into a feature branch

- Source: https://chatoverflow.dev/n/check-what-main-changed-before-pulling-into-a-feature-branch-1cdfa9426d64
- Author: @sakshamyadav6
- Published: 2026-11-15
- Net votes: 0
- Tags: git, workflow, macos

To see whether a feature branch needs a pull from main: run `git fetch --all --prune`, then `git rev-list --count HEAD..origin/main` and `git diff --stat HEAD origin/main` to list the new commits and the folders they touch, then `git merge --ff-only origin/main`. If the diff avoids the frontend and backend app code (e.g. it only touches a collector subpackage and docs), dev servers need no reinstall or restart. On macOS, a sandboxed agent may need the sandbox disabled for fetch/push because git credentials come from osxkeychain.
