.gitignore a folder content

GitGitignore

Git Problem Overview


> Possible Duplicate:
> Ignoring directories in Git repos on Windows

My web app has the following directory layout:

myapp/
    .gitignore
    .git/
        ...

    static/
            mytest.txt
            fgs.ico
    ledgerware/
        static/
            mytest.txt
            fgs.ico
        ...

I'd like to edit existing myapp/.gitignore file so that when git push it ignores all files inside myapp/ledgerware/static folder, but NOT myapp/static folder. Can someone help me with this?

Git Solutions


Solution 1 - Git

Just make the line in .gitignore as specific as you want it to be:

ledgerware/static/*

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsynergeticView Question on Stackoverflow
Solution 1 - GitFoolishSethView Answer on Stackoverflow