Re: [git-users] Adding directories
From: Rustom Mody Hi Context is we're using git for collectively editing documents(mostly text ie not Word etc). Sharing is on bitbucket. There are also largish reference-docs -- downloaded pdfs etc that are referenced but not ours -- dont want these in the repo. So... If I make a .gitignore that contains the 'downloads' directory, then the contents of downloads is of course ignored but also downloads itself. Making .gitignore contain downloads/* does not add downloads. Finally I added a dummy-file to downloads; add-commited it and then ignored downloads. Seems convoluted and unsure (to me). Is there a better way? The other alternative is to make that 'downloads' directory a sub-module, i.e. an independent reference repository. That way, they (users) only neeed to get it once and it stays valid, and it isn't part of the main repo. As long as the reference is glacial, then the 'hassles' that some report for the confusions when using sub-modules essentially go away. Philip -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Adding directories
On Mon, 16 Mar 2015 19:07:16 +0530 Rustom Mody wrote: [...] > Finally I added a dummy-file to downloads; add-commited it and then > ignored downloads. > > Seems convoluted and unsure (to me). > Is there a better way? No, there isn't. Git does not track directories directly -- only as a byproduct of adding files contained in them. So either do what you did or, possibly better, add a script to your repository which, when called, will create this directory locally. The reasoning behind this: Git is not a deployment/configuration system but rather a content management solution with "content" being defined as whatever is contained in the files being managed. From this PoV, having an ability to put a sole directory under version control has no sense as it does not represent content but rather a workplace configuration orthogonal to the repository's content. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Adding directories
Hi Context is we're using git for collectively editing documents(mostly text ie not Word etc). Sharing is on bitbucket. There are also largish reference-docs -- downloaded pdfs etc that are referenced but not ours -- dont want these in the repo. So... If I make a .gitignore that contains the 'downloads' directory, then the contents of downloads is of course ignored but also downloads itself. Making .gitignore contain downloads/* does not add downloads. Finally I added a dummy-file to downloads; add-commited it and then ignored downloads. Seems convoluted and unsure (to me). Is there a better way? Rusi -- http://blog.languager.org -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.