> For the complete documentation index, see [llms.txt](https://amartyushov.gitbook.io/tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amartyushov.gitbook.io/tech/tools/cli/git.md).

# git

## Cheatsheet

* [replacing LF with CRLF](https://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf/20653073%2320653073)
* .gitignore is not working
  * ```
    Even if you haven't tracked the files so far, git seems to be able to "know" about them even after you add them to .gitignore. 
    NOTE : First commit your current changes, or you will lose them.

    Then run the following commands from the top folder of your git repo:
    git rm -r --cached .
    git add .
    git commit -m "fixed untracked files
    ```
* :thumbsup:[Great explanation of some (most common) commands](https://dev.to/lydiahallie/cs-visualized-useful-git-commands-37p1)
