I know there are questions floating around regarding git pull
from a specific branch when you provide no explicit branch name, however I am wondering if it's possible to force a pull branch even if the user does specify a different branch.
Example.
If I was to log into a live server and pull the latest changes, I only want changes from the branch live. So if I was to execute the following in the shell:
git pull origin master
I would want git to either
- Throw an error
- Ignore it and just pull from the live branch on the origin remote
Is this possible? I'm hoping to avoid any situations like this one and because it's a core business system it's not good when things go awry.