Jump to content



Photo

.gitignore


  • Please log in to reply
1 reply to this topic

#1 BGM

BGM

    Wibble Wobble™

  • Joined: 30-March 03
  • Location: Farnborough, UK

Posted 27 April 2013 - 14:18

Hi,

At work we have a new project that is utilising visual studio tfs online, and we have chosen to use git.

my question i hope is pretty simple. taking the .gitignore file as has been generated here: http://gitignore.io/api/visualstudio

and putting it into a visual studio solution with multiple projects, should i place the ignore file into the repo root? solution root? or create copies in each project?

thank you


#2 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 27 April 2013 - 15:15

Each Git repository needs its own .gitignore, which is most commonly placed in the root of the repository. In other words, your .gitignore should be in the same directory as your .git folder. The following is a directory listing of the root of the Coreboot Git repository that illustrates my point:
$ ls -Al
total 88
drwxrwxr-x  2 xorangekiller xorangekiller  4096 Mar 19 10:19 3rdparty
-rw-rw-r--  1 xorangekiller xorangekiller 17987 Mar 19 10:19 COPYING
drwxrwxr-x  3 xorangekiller xorangekiller  4096 Apr 16 17:47 documentation
drwxrwxr-x  8 xorangekiller xorangekiller  4096 Apr 27 11:12 .git
-rw-rw-r--  1 xorangekiller xorangekiller  1808 Mar 19 10:19 .gitignore
-rw-rw-r--  1 xorangekiller xorangekiller    89 Mar 19 10:19 .gitmodules
-rw-rw-r--  1 xorangekiller xorangekiller    83 Mar 19 10:19 .gitreview
-rw-rw-r--  1 xorangekiller xorangekiller  9667 Mar 19 10:19 Makefile
-rw-rw-r--  1 xorangekiller xorangekiller 15881 Mar 19 10:19 Makefile.inc
drwxrwxr-x  8 xorangekiller xorangekiller  4096 Mar 19 10:19 payloads
-rw-rw-r--  1 xorangekiller xorangekiller  2998 Mar 19 10:19 README
drwxrwxr-x 15 xorangekiller xorangekiller  4096 Mar 24 15:44 src
drwxrwxr-x 35 xorangekiller xorangekiller  4096 Mar 19 10:19 util