Push tag

3 snippets across 2 stacks — Git, Docker

Also written as push tags · tag and push

GitGit

Push All Branches

Git · Remote Repositories
syntax
git push --all <remote>
git push --tags <remote>
example
git push --all origin
git push --tags origin

Note Pushes every local branch to the remote. Be cautious with this in shared repos — you might push experimental branches others don't want. --tags pushes all tags separately.

Push Tags to Remote

Git · Tags
syntax
git push origin <tag>
git push origin --tags
example
# Push a single tag:
git push origin v2.0.0

# Push all tags:
git push origin --tags
output
To https://github.com/user/project.git
 * [new tag]         v2.0.0 -> v2.0.0

Note Tags are NOT pushed automatically with git push. You must explicitly push them. --tags pushes all local tags that don't exist on the remote.

DKDocker

Tag & Push Workflow

DK · Registry & Distribution
syntax
docker tag <local_image> <registry>/<repo>:<tag>
docker push <registry>/<repo>:<tag>
example
docker build -t myapp:1.0 .
docker tag myapp:1.0 ghcr.io/myorg/myapp:1.0
docker tag myapp:1.0 ghcr.io/myorg/myapp:latest
docker push ghcr.io/myorg/myapp:1.0
docker push ghcr.io/myorg/myapp:latest

Note Always push a specific version tag alongside latest. This way, deployments can pin to a known version while latest serves as a convenience pointer for development.