Sometimes I see at articles command: git pull -p
But I do not found info about that in official documentation
What does that option mean?
UPD
As noted by @torek the -p
option is passed to git fetch
. And -p
here means:
-p
--prune
Before fetching, remove any remote-tracking references that no longer exist on the remote.
But I do not understand how git-pull
corporate cooperate with git-fetch
?
How I can figure out how and which git
options fall through one command to another?
A git pull command is a shorthand command that gets interpreted as a "git fetch" plus a "git merge FETCH_HEAD" command. If you give a -p flag to a pull, it is actually the --prune command that gets run with the "git fetch" part of the command. This removes (prunes) all remote-tracking branches in your local repository that no longer exist on origin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With