# Extra commands

Extra

`git diff --no-index --word-diff old_file.txt new_file.txt`

## Ohter commands

\[to sort]

hips\://[www.atlassian.com/git/tutorials](http://www.atlassian.com/git/tutorials)

<https://swcarpentry.github.io/git-novice/04-changes/>

To stag a deleted file (the second option will only delete the file from git but will keep the local copy, for example, if a file type has been added to .gitignore, to delete files of this type already commited).

```bash
git rm foo
git rm --cached foo
```

git reset --hard \<commit>

git reset --hard origin/master

Don't use git checkout but use git switch and git restore.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://antoinearnoud-2.gitbook.io/git-for-economists/extra-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
