SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast laresistance2's Avatar
    Join Date
    May 2011
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Add an empty folder with GIT

    Hello,
    I want to know how to keep an empty folder with git.
    Many people used the trick of adding an empty file (eg .gitkeep) in this folder.

    But would like to know if there is a way to do it without adding a file in that folder, but simply add path folder to in a configuration file (a bit like the file .gitignore).

    Thank you

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    It seems it's not possible by design http://stackoverflow.com/questions/1...git-repository

    Why do you want it?

  3. #3
    SitePoint Enthusiast laresistance2's Avatar
    Join Date
    May 2011
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So the only hack is to add an empty file (.gitkeep or other) in the folder

    Quote Originally Posted by markbrown4 View Post
    Why do you want it?
    In some cases it is interesting to do, for example in a branch where the software is stable, we can offer people to download the software directly via the branch and therefore the application can run, you have these folders (cache, temporary, ...) is present.

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    As far as I know, usually those types of functions create the folders required if they're not there.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •