# Basic DVC workflow

**URL:** <https://discuss.dvc.org/t/basic-dvc-workflow/1467>\
**Category:** Questions\
**Created:** [January 19, 2023, 11:41pm UTC](https://discuss.dvc.org/t/basic-dvc-workflow/1467 "2023-01-19T23:41:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.waterworth](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@david.waterworth](https://discuss.dvc.org/u/david.waterworth)\
**Post date:** [January 19, 2023, 11:41pm UTC](https://discuss.dvc.org/t/basic-dvc-workflow/1467/1 "2023-01-19T23:41:10Z")

</div>

I’m a new DVC user and I have a question about the basic model management workflow.

I’ve configured a repo for DVC, I ran a test experiment by creating a feature branch. I ran a sweep and selected the `best` model, i.e.

```auto
dvc exp run -S 'train.batch_size=16,32,64,128' --queue
dvc queue start
dvc exp apply ex1
git add .
git commit -m 'My Experiment'

```

I have a question about how to merge this back to main correctly, the process I’ve been following is:

- switch to `main`
- merge the feature branch to `main`
- `dvc pull`

The last step seems to be important - if I don’t do the the vscode source control sidebar shows uncommitted DVC tracked model files. Is this the correct workflow (I’m about to learn GTO but I wanted to ensure that I can correctly manage the state of my `main` branch first).

---

<div class="post-metadata">

**Author:** ![shcheklein](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dvc.org/shcheklein/32/173_2.png) [@shcheklein](https://discuss.dvc.org/u/shcheklein)\
**Post date:** [January 19, 2023, 11:56pm UTC](https://discuss.dvc.org/t/basic-dvc-workflow/1467/2 "2023-01-19T23:56:24Z")

</div>

Hey, @david.waterworth !

TL;DR: I think this link is worth checking: [Example: Make an experiment persistent](https://dvc.org/doc/command-reference/exp/apply#example-make-an-experiment-persistent)

A few comments on the workflow and suggestion to try:

- I think you don’t need a branch for this. If you want at the end an experiment as part of the main branch (e.g. a new commit as a result of running a sweep), I would just run experiments in main. If you run them in the queue they don’t affect the workspace, etc.
- When you are done, you could do [`dvc exp apply`](https://dvc.org/doc/command-reference/exp/apply), [`dvc exp branch`](https://dvc.org/doc/command-reference/exp/branch) to “materialize” an experiment as a commit in `main` or as a new branch.

In VS Code you could use context menu to apply an experiment or do a branch.

 ![Screen Shot 2023-01-19 at 3.55.39 PM](https://canada1.discourse-cdn.com/flex035/uploads/dataversioncontrol/original/1X/52c529bd868aaf30f61c55c5dc982fdd7cd5e0b7.png)

Let us know if that solves the issue.
