DELAPARRA
Index
Color
NL
Category: CLI flags

-f, --force (Force)

Explained by Updated

What is -f, --force (Force)?

-f, --force (Force): Skip confirmation prompts and proceed even when the action would normally be blocked or warned about. --force tells a command to go ahead even when it would normally stop and warn you. rm -f deletes without asking. git push --force overwrites the remote branch with your local version. docker rm -f stops and removes a running container.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about -f, --force (Force)

How is -f, --force (Force) used in practice?

The warning exists because the action is often destructive. A forced push can throw away commits a colleague pushed an hour ago. That is why git push --force-with-lease exists: it only overwrites the remote if it still looks the way you last saw it.

What should you keep in mind with -f, --force (Force)?

Force is sometimes the right tool. Cleaning up a broken local environment is a fair use. But if a script needs --force to run every time, something in the setup is wrong. Find out what the command was warning about before you silence it for good.

At a glance

CategoryCLI flags
Explained by
Updated

More CLI flags terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.