Question: i want to commit my changes, but git hangout, when i run

```
git add .

```

i rerun it using -v option, then i get

```
add 'dev/less/module/basic-structure/eo-featured.less'
add 'dev/less/module/page-content/content/.eo-cv.less.swo'

```

am using vim, that's why i guess that .swo file, i don't know what that is, but i don't need it, so i run:

```
git rm dev/less/module/page-content/content/.eo-cv.less.swo

```

the result was

```
fatal: pathspec 'dev/less/module/page-content/content/.eo-cv.less.swo' did not match any files

```

any ideas ?

Answer: 
If the file was never *committed*, `git rm` won't work.

Running `git status` will show you how to properly unstage this file:

```
$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
        new file:   dev/less/module/basic-structure/eo-featured.less
        new file:   dev/less/module/page-content/content/.eo-cv.less.swo

```

So `git reset HEAD dev/less/module/page-content/content/.eo-cv.less.swo` should unstage the file.
The `.swo` file isn't tracked by git (unless you already added it in the past), this is why you can't use `git rm` (which only tells git to stop tracking the files).

You just don't want to stage it when using `git add`, and you have two ways to do that:

1. Giving only the files you really want to stage to `git add` (instead of of `.`)
2. Writing `*.swo` to your `.gitignore` file (which you can create if it doesn't exist).