Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guide: begin How To section #1705

Merged
merged 28 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1fd3f9f
Revert "guide: undo starting How To subsection"
jorgeorpinel Aug 10, 2020
c66b888
resolving conflict
imhardikj Aug 21, 2020
f3c8776
Merge branch 'master' into guide/how-to
imhardikj Aug 21, 2020
8880af5
update best practices
imhardikj Aug 22, 2020
11ab85b
Merge branch 'master' into guide/how-to
imhardikj Aug 24, 2020
93cb036
Best practices update
imhardikj Aug 24, 2020
3a39654
adding best pratices
imhardikj Aug 25, 2020
b2af801
modifying best pratices
imhardikj Aug 27, 2020
2994cf8
Update content/docs/user-guide/how-to/best-practices.md
jorgeorpinel Aug 27, 2020
ba02f17
updates
imhardikj Aug 29, 2020
ac6e997
updates
imhardikj Aug 29, 2020
eb67860
Update best-practices.md
imhardikj Aug 29, 2020
fb62cb1
Update best-practices.md
imhardikj Aug 29, 2020
8121897
removing best practice doc
imhardikj Sep 12, 2020
a3a5837
Undo dvc add doc
imhardikj Sep 18, 2020
c030f4f
Update content/docs/user-guide/how-to/undo-dvc-add.md
jorgeorpinel Sep 19, 2020
f0e4c79
updates
imhardikj Sep 20, 2020
da456cd
updates
imhardikj Sep 20, 2020
288b627
Update content/docs/user-guide/how-to/undo-adding-data.md
jorgeorpinel Sep 23, 2020
7e3ac80
Update content/docs/user-guide/how-to/undo-adding-data.md
jorgeorpinel Sep 23, 2020
3139491
Update content/docs/user-guide/how-to/undo-adding-data.md
jorgeorpinel Sep 23, 2020
dfb9824
updates
imhardikj Sep 24, 2020
33504c9
updates
imhardikj Sep 24, 2020
8e15350
Update content/docs/command-reference/add.md
jorgeorpinel Sep 24, 2020
d5f422d
Update content/docs/command-reference/add.md
jorgeorpinel Sep 24, 2020
e9edbdd
updates
imhardikj Sep 25, 2020
5bfd2c8
Update content/docs/user-guide/how-to/undo-adding-data.md
jorgeorpinel Sep 28, 2020
c7f30b7
Update content/docs/user-guide/how-to/undo-adding-data.md
jorgeorpinel Sep 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions content/docs/command-reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ files that can be easily tracked with Git.
It's possible to prevent files or directories from being added by DVC by adding
the corresponding patterns in a [`.dvcignore`](/doc/user-guide/dvcignore) file.

You can also [undo `dvc add`](/docs/user-guide/how-to/undo-adding-data) to stop
tracking files or directories added previously.
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

By default, DVC tries to use reflinks (see
[File link types](/doc/user-guide/large-dataset-optimization#file-link-types-for-the-dvc-cache)
to avoid copying any file contents and to optimize `.dvc` file operations for
Expand Down
7 changes: 6 additions & 1 deletion content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@
"katacoda": "https://katacoda.com/dvc/courses/examples/dvcignore"
}
},
"updating-tracked-files",
{
"label": "How To",
"slug": "how-to",
"source": false,
"children": ["undo-adding-data", "update-tracked-files"]
Comment on lines -101 to +105
Copy link
Contributor Author

@jorgeorpinel jorgeorpinel Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So! It seems this URL transition was not smooth at all. Just leaving this here for future reference and it's not a major page that used to have thousands of visits but we went from over 100 to around 20 total after this 😢 (for now).

A redirect would probably have helped after all (cc @shcheklein) because some the traffic for this page came from old GitHub comments that had a direct link, which after this change started producing 404s (I fixed those comments now).

image

Cc thanks for the tip on GA usage for this @jeremydesroches (in #1823 (comment))

},
"setup-google-drive-remote",
"large-dataset-optimization",
"external-dependencies",
Expand Down
46 changes: 46 additions & 0 deletions content/docs/user-guide/how-to/undo-adding-data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Undo Adding Data

There are situations where you want to stop tracking data added previously.
Follow the steps listed here to undo `dvc add`.

Let's first add a data file into an example <abbr>project</abbr> using
`dvc add`, which creates a `.dvc` file to track the data:

```dvc
$ dvc add data.csv
$ ls
data.csv data.csv.dvc
```

Now let's reverse this action:
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

> Note,if you are using `symlink` or `hardlink` as
> [link](doc/user-guide/large-dataset-optimization#file-link-types-for-the-dvc-cache)
> type for DVC <abbr>cache</abbr>, you will have to unprotect the tracked file
> first (see `dvc unprotect`):
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
>
> ```dvc
> $ dvc unprotect data.csv
> ```

You'll need to remove the corresponding `.dvc` file and `.gitignore` entry using
`dvc remove`:
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```dvc
$ dvc remove data.csv.dvc
```

Data file `data.csv` is now no longer being tracked by DVC.

```dvc
$ git status
Untracked files:
data.csv
```

You can run `dvc gc` with the `-w` option to remove the data that isn't
referenced in the current workspace from the cache:

```dvc
$ dvc gc -w
```