SyntaxHighlighter JS

2013-03-03

Ignore Git

  • How do I find the global ignore configuration file?
    git config --get-all core.excludesfile

    (In svn, the global ignore configuration file is al
    ways ~/.subversion/config)

  • How do I create a global ignore file if one is not configured?
    git config --global core.excludesfile ~/.gitignore_global

    (In svn, just create the text file ~/.subversion/config)

  • What do I put in the global ignore configuration text file?
    You can find examples of .gitignore_global at
    https://github.com/github/gitignore/tree/master/Global

    (In svn, just add this line into ~/.subversion/config
     global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo  *.rej *~ #*# .#* .*.swp .DS_Store *.class
    )

  • How do I configure ignores specific to a project?
    In the project directory, you can create or edit either the file .git/info/exclude or .gitignore. It has the same format as the global ignore.

    (In svn,
    Configure .svnignore as local ignore file:
    svn propset svn:ignore -F .svnignore /path/to/svn/workspace

    Configure just one ignore:
    svn propset svn:ignore "files_to_ignore" /path/to/svn/workspace

    Configure a group of ignores:
    svn propedit svn:ignore /path/to/svn/workspace

    View what is ignored
    svn propget svn:ignore /path/to/svn/workspace
    )

No comments:

Post a Comment