1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [-u, --upstream, --user (Upstream / User)](<https://delaparra-services.nl/knowledge-hub/u-upstream-user-upstream-user>)

  

Category: CLI flags 

# -u, --upstream, --user (Upstream / User)

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is -u, --upstream, --user (Upstream / User)?

 

-u, --upstream, --user (Upstream / User): Sets a tracking relationship or specifies which user/account an action runs as. ` -u ` is another overloaded flag. In ` git push -u origin feature ` it sets the upstream, so later ` git push ` and ` git pull ` know which remote branch belongs to your local one. In ` docker run -u 1000 ` and ` sudo -u deploy ` it sets which user a command runs as.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about -u, --upstream, --user (Upstream / User)

  

### How is -u, --upstream, --user (Upstream / User) used in practice?

 

Setting the upstream once saves you typing the remote and branch name on every push. It also makes ` git status ` tell you how far ahead or behind the remote you are.

    

### What should you keep in mind with -u, --upstream, --user (Upstream / User)?

 

The user meaning is about safety. Containers run as root by default, which means a bug in your application runs with full rights inside that container. Running as a normal user limits what an attacker could do. In a Dockerfile, set a ` USER ` line, and in commands that need it, run them as the least powerful account that can do the job.

 

## At a glance

   CategoryCLI flags Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More CLI flags terms

 

- [-q, --quiet, --silent (Quiet / Silent)](<https://delaparra-services.nl/knowledge-hub/q-quiet-silent-quiet-silent>) 
- [-r, -R, --recursive (Recursive)](<https://delaparra-services.nl/knowledge-hub/r-r-recursive-recursive>) 
- [-t, --tag, -t (tty) (Tag / Allocate TTY)](<https://delaparra-services.nl/knowledge-hub/t-tag-t-tty-tag-allocate-tty>) 
- [-v, --verbose (Verbose)](<https://delaparra-services.nl/knowledge-hub/v-verbose-verbose>) 
- [-w, --watch (Watch)](<https://delaparra-services.nl/knowledge-hub/w-watch-watch>) 
- [-x, --exclude, -x (trace) (Extract / Exclude / Trace)](<https://delaparra-services.nl/knowledge-hub/x-exclude-x-trace-extract-exclude-trace>)

 

[All terms starting with a number or symbol](<https://delaparra-services.nl/knowledge-hub#letter-other>)

 

## Skills

 

- ### CLI flag safety

 

Use before running or suggesting shell commands with flags, especially destructive or broad ones (-f/--force, -r/-R recursive, -a/--all, -y/--yes, prune, --hard), and when a user asks what a flag means (-v, -q, -n/--dry-run, -h, -o, -p, -t, -u, -w, -x, -c, -i). Explains flags per tool and prefers dry runs and narrow scopes.

 [View skill](<https://delaparra-services.nl/skills/cli-flag-safety>) [Download zip](<https://delaparra-services.nl/skills/cli-flag-safety/download>) 
- ### Docker Destructive Command Guardrails

 

Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — \`docker rm\`,

 [View skill](<https://delaparra-services.nl/skills/docker-destructive-guardrails>) [Download zip](<https://delaparra-services.nl/skills/docker-destructive-guardrails/download>) 
- ### ShellCheck Configuration and Static Analysis

 

Master ShellCheck static analysis configuration and usage for shell script quality. Use when setting up linting infrastructure, fixing code issues, or ensuring script portability.

 [View skill](<https://delaparra-services.nl/skills/shellcheck-configuration>) [Download zip](<https://delaparra-services.nl/skills/shellcheck-configuration/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/u-upstream-user-upstream-user/skills.zip>)

 

## Manuals

 

- [The terminal commands you actually need](<https://delaparra-services.nl/manuals/terminalcommandos-die-je-nodig-hebt>) 
- [The terminal and PowerShell](<https://delaparra-services.nl/manuals/de-terminal-en-powershell>)

 

## Related services

 

- [Your own coding agent](<https://delaparra-services.nl/services#service-06>)

If you want to use a coding agent, we provide all the infrastructure to help it work efficiently.

 

## 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.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/u-upstream-user-upstream-user)
