Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Serhat Teker
Serhat Teker

Posted on • Originally published attech.serhatteker.com on

     

Git Which Ignores

You just started a new project that a team has working on for a while and like to add your code into the codebase. Or you want to use a well-known webapp template for your new project.

You wrote the code, made your tests and then added your "piece of magic" text but it doesn't show up inversion control.git status not showing your file or directory. Also you can't check manually.gitignore since it is 450 lines long.

The solution? Use built-in git commandcheck-ignore:

$ git check-ignore -v filename
Enter fullscreen modeExit fullscreen mode

For instance; you wrotebashscripts for some automation and added them in a directory calledscripts in the project root. When you usecheck-ignore it would give some output like below:

.gitignore:274:[Ss]cripts       scripts
Enter fullscreen modeExit fullscreen mode

Which basically says: on the line "274"[Ss]cripts causes to ignore yourscripts directory.

All done.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Uomo Universale | Software Engineer | Entrepreneur | builds systems | py:go:js |
  • Location
    127.0.0.1
  • Work
    Software Engineer
  • Joined

More fromSerhat Teker

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp