---
title: "Discussion on \"How to ignore a file on git after created repository ?\" | Hashnode"
description: "Discussion on \"How to ignore a file on git after created repository ?\". Steps:\n\nCreate a .gitignore file on the root\nTo ignore a directory: name_of_directory/ \nTo ignore a file: name_of_file\n\nWe don't need to provide the complete path of the file or directory to be ignored, we just have to provide its name.\nIf you want t..."
url: "https://hashnode.com/posts/how-to-ignore-a-file-on-git-after-created-repository/61e789346f4d6f431978c337"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to ignore a file on git after created repository ?](https://blog.stevesultan.com/how-to-ignore-a-file-on-git-after-created-repository?utm_source=hashnode&utm_medium=feed)

Steps: Create a .gitignore file on the root To ignore a directory: name\_of\_directory/ To ignore a file: name\_of\_file We don't need to provide the complete path of the file or directory to be ignored, we just have to provide its name. If you want t...

Jan 19, 2022 · 1 min read · blog.stevesultan.com  
Read the article

-   [#git](https://hashnode.com/tag/git)

## Written by

[Steve Sultan](https://hashnode.com/@stevesultan)

@stevesultan

  
[View profile](https://hashnode.com/@stevesultan)

Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
