Courses / GitHub
18. Fetching vs Pulling (git fetch / git pull)
Synchronizing local branches with remote changes using git fetch and git pull and deciding when to merge or rebase.
Git / Bash
Fetching vs Pulling (git fetch / git pull)
Commands to bring remote changes into your local repository: fetch updates refs, pull fetches then integrates.
"I want to see what changed on origin without accidentally changing my local branch."
git fetch downloads commits and updates remote-tracking branches without touching your current branch; git pull does that then merges (or rebases) the changes into your current branch.
"I want to see what changed on origin without accidentally changing my local branch."
git fetch downloads commits and updates remote-tracking branches without touching your current branch; git pull does that then merges (or rebases) the changes into your current branch.