Skip to main content

How to Upload Data to a DVC Remote with dvc push

· 9 min read
Jagdish Kumawat
Founder @ Dewiride

dvc add keeps a file's contents in your project's cache, on your own disk and nowhere else. dvc push uploads them to the project's remote storage, so a clone, a teammate or a new computer can download them again. This guide checks what will be uploaded, pushes one file to a folder used as the remote, with DVC 3.67.1, and finds the file in the remote.

Syntax​

Syntax
dvc push [-r <remote>] [<targets>]
PartWhat it means
dvc pushUploads the data the project's .dvc files point to, from the cache to the remote
-r <remote>Optional: the remote to upload to. Without it, DVC uses the default remote
<targets>Optional: only these files, folders or .dvc files. Without them, DVC uploads everything the project tracks

The dvc push reference says: "dvc push uploads data from the cache to a dvc remote. Note that pushing data does not affect code, dvc.yaml, or .dvc files. Those should be uploaded with git push."

The Example​

bird-counts is a Git repository where dvc init has run and data/counts.csv, a short list of birds seen each day, is tracked with dvc add. Its default remote is a folder called dvc-storage in the home folder, and nothing has been pushed yet.

Prerequisites​

  • DVC, in a Git repository where dvc init has run. Run dvc --version to check; this guide uses DVC 3.67.1.
  • A default remote. dvc remote list shows it with (default) after its folder.

Step 1: See What Will Be Uploaded​

Terminal
dvc status --cloud
Output
new: data/counts.csv

The terminal after dvc status --cloud, which lists data/counts.csv as new.

--cloud, or -c, compares the cache with the default remote. The dvc status reference says new "means that the file/directory exists in the cache but not in remote storage". That's what dvc push will upload.

Step 2: Push​

Terminal
dvc push
Output
Collecting |1.00 [00:00, 563entry/s]
Pushing
1 file pushed

The terminal after dvc push: a Collecting progress bar, then Pushing, then 1 file pushed.

DVC collected the files the project's .dvc files point to, and uploaded the one the remote didn't have. The reference describes it the same way: "DVC then gathers a list of files missing from the remote storage, and uploads them." The command is the same in PowerShell.

Step 3: Find the File in the Remote​

The remote is a plain folder, so you can look inside it. List its files:

Terminal
find $HOME/dvc-storage -type f
Output
/Users/you/dvc-storage/files/md5/b9/15dff7a4c8ad4f4dd82179489eb543

One file, with no counts.csv in its name. Compare its path with the md5 in the .dvc file:

Terminal
cat data/counts.csv.dvc
data/counts.csv.dvc
outs:
- md5: b915dff7a4c8ad4f4dd82179489eb543
size: 80
hash: md5
path: counts.csv

The terminal after find $HOME/dvc-storage -type f, which lists one file, files/md5/b9/15dff7a4c8ad4f4dd82179489eb543, and cat data/counts.csv.dvc, whose md5 is b915dff7a4c8ad4f4dd82179489eb543.

The remote stores the file under its MD5 hash: the first two characters, b9, are a folder, and the other 30 are the file name. That's the same layout as the cache in .dvc/cache. The name counts.csv lives only in the .dvc file, in Git, and the hash connects the two.

Step 4: Push Again​

Check the remote again, and push a second time:

Terminal
dvc status --cloud
Output
Cache and remote 'storage' are in sync.
Terminal
dvc push
Output
Collecting |1.00 [00:00, 790entry/s]
Pushing
Everything is up to date.

The terminal after dvc status --cloud says Cache and remote 'storage' are in sync, and a second dvc push says Everything is up to date.

The remote already has the file, so a second push uploads nothing. DVC only sends what the remote is missing, which makes dvc push safe to run as often as you like.

Push the .dvc Files with Git​

dvc push uploads the data and nothing else. The .dvc files, which say which version of the data belongs to each commit, travel with Git: when the project has a Git remote, such as a repository on GitHub, run git push as well. If only the .dvc files are pushed, a clone has the pointers but no data to download, and dvc pull fails. The pull guide shows that error.

A Change Isn't Pushed Until You Track It​

Here one more line was added to data/counts.csv, and dvc push was run without dvc add first:

Terminal
echo "2026-11-02,blackbird,3" >> data/counts.csv
Terminal
dvc push
Output
Collecting |0.00 [00:00, ?entry/s]
Pushing
Everything is up to date.
Terminal
dvc status
Output
data/counts.csv.dvc:
changed outs:
modified: data/counts.csv

The terminal after a line is added to data/counts.csv: dvc push says Everything is up to date, and dvc status shows data/counts.csv as modified.

Everything is up to date. is true, but only for the version the .dvc file points to. dvc push uploads from the cache, and the change isn't in the cache until dvc add data/counts.csv puts it there. Then commit the .dvc file and push again. The guide to saving a new version does all three.

Error: No Remote Specified​

In no-remote, a project without any remote, dvc push stops:

Terminal
dvc push
Output (last lines)
ERROR: failed to push data to the cloud - config file error: no remote specified in /Users/you/source/no-remote. Create a default remote with
dvc remote add -d <remote name> <remote url>

The terminal after dvc push in a project without a remote: the error no remote specified, with the suggestion to run dvc remote add -d.

The suggestion is the fix: add a remote with -d. The local folder remote guide sets one up. If the project has a remote that isn't the default, the message says Setup default remote with instead, and dvc remote default <name> fixes it.

Common Mistakes​

MistakeWhat happensDo this instead
Pushing only with GitThe .dvc files arrive without their data, and dvc pull in a clone failsRun dvc push as well as git push
Pushing a changed file without dvc addEverything is up to date., and the change stays on your disk onlydvc add, commit the .dvc file, then dvc push
Expecting dvc push to commitIt never touches GitCommit the .dvc files with Git

Troubleshooting​

SymptomLikely causeFix
no remote specified … Create a default remote withThe project has no remotedvc remote add -d <name> <folder>
no remote specified … Setup default remote withIt has a remote, but none is the defaultdvc remote default <name>
Everything is up to date., but dvc status shows modifiedThe change isn't in the cache yetdvc add <file>, then dvc push

FAQ​

Does dvc push upload every version of my data?​

Without options, it uploads only the versions the current .dvc files point to. The reference says --all-commits "examines metafiles in all Git commits, as well as in the workspace. This uploads tracked data for the entire commit history of the project."

Can I push only one file?​

Yes, give its path. The reference says: "Any targets given to this command limit what to push."

How do I see what would be pushed without pushing?​

dvc status --cloud, as in Step 1. The reference says it "can be used to see what files dvc push would upload."

Conclusion​

dvc status --cloud listed data/counts.csv as new, dvc push uploaded it, and the remote stored it under its MD5 hash, files/md5/b9/15dff7…, the same hash as in the .dvc file. A second push sent nothing, and a change wasn't pushed until dvc add put it in the cache. The .dvc files still go through Git.

Additional Resources​

  • dvc push — every option, including -r, --all-commits and targets.
  • dvc status — --cloud and what new, deleted and missing mean.