Question: ```
cbc$Gender <- recode_factor(cbc$Gender, c(0,1) = c("Female", "Male"))
cbc$Florence <- recode_factor(cbc$Florence, c(0,1) = c("No", "Yes"))

```

Answer: 
Your post title reads:

> 
> .DS\_Store is showing up as a pending change in my Git repo despite being untracked
> 
> 
> 

You're right that it is untracked:

> 
> 
> ```
> On branch develop
> Your branch is up to date with 'origin/develop'.
> 
> Untracked files:
>   (use "git add <file>..." to include in what will be committed)
>         ../.DS_Store
> 
> nothing added to commit but untracked files present (use "git add" to track)
> 
> ```
> 
> 

But your claim that it is a "pending change [to your] Git repo", from the title, is wrong. (It's possible that VSCode, which does its own thing, is misleading you here, since you mentioned VSCode, but you've posted this with [git](/questions/tagged/git "show questions tagged 'git'") and not [visual-studio-code](/questions/tagged/visual-studio-code "show questions tagged 'visual-studio-code'")—edit: oh, I see someone *removed* that tag). It's merely showing up as an untracked file. *This is normal!* You just want to get Git to shut up about it, using `.gitignore`.1

As [Michael Delgado said in a comment](https://stackoverflow.com/questions/69005605/ds-store-is-showing-up-as-a-pending-change-in-my-git-repo-despite-being-untrack#comment121957851_69005605), the path name:

```
../.DS_Store

```

is significant here. This means that you are in a subdirectory of your working tree: some folder *within* the working tree, not at the top level where the `.git` directory itself exists. You'll need to ascend one level:

```
cd ..

```

before creating or updating the `.gitignore` file that should list the `.DS_Store` file that the Mac Finder creates. If you are in, say, `app/` within the top level, the file `app/.gitignore` cannot make Git ignore (shut up about) the file `.DS_Store` in the top level. It *can* ignore the file `app/.DS_Store`, but not the top-level one.

---

1It *is* a good idea to get Git to shut up about it. Ideally, every output line from `git status` should be useful. The fact that `.DS_Store` is not going to be committed is desirable, so complaining about it, as Git is doing, is *not* useful.
If the gitignore rule is created after git areadly logged the .DS file it will be carried in the update.