2015-11-05 58 views
5

使用Laravel 5.x.或5.1.x
.hgignore文件的基本推薦配置是什麼?Laravel 5 - Mercurial推薦.hgignore

從拉的.gitignore這就是我:

syntax: glob 
.env 
.gitignore 
.gitattributes 
.idea 
vendor/ 
node_modules/ 
Homestead.yaml 
Homestead.json 

網上我看到的版本4講講/bootstrap/compiled.php
我應該包括/引導/緩存?

+0

一般:這將頻繁出現在庫目錄,但不應成爲它的一部分的一切。 – planetmaker

+0

我發現在某些文件結構中保留.gitignore文件會創建一個錨,允許提交空文件夾,如/ storage/cache// storage/sessions /和/ storage/views/ – ScraperDave

+0

mercurial僅在其存儲庫中使用.hgignore根文件夾(和你的全局文件夾) – planetmaker

回答

2

我用排除模式,包括空的文件夾結構:

## Laravel specific 
^\.env$ 
^vendor 

## General 
\.DS_Store$ 
[Tt]humbs\.db$ 

## Keep these folders, but ignore their content 
^bootstrap/cache/(?!\.gitignore).+$ 
^storage/logs/(?!\.gitignore).+$ 
^storage/app/(?!\.gitignore).+$ 
^storage/framework/views/(?!\.gitignore).+$ 
^storage/framework/sessions/(?!\.gitignore).+$ 
^storage/framework/cache/(?!\.gitignore).+$ 
+0

嘿@JannieT。我試過你的例子,但它似乎不適合我。例如,我仍然在storage/framework/views下看到我所有的觀點,前面。我真的很想得到這個工作。任何其他的想法,爲什麼我仍然會看到這些文件?謝謝 –

+0

@GotTheFeverMedia,你可能有'syntax:glob'包含嗎?它可能會搞砸了。另外,請確保在該文件夾中有一個.gitignore文件。 –

+0

@GotTheFeverMedia作爲最後的手段,根據文檔,你也可以指定一個子文件夾特定的忽略:「子目錄可以有自己的'.hgignore'設置,通過添加'subinclude:path/to/subdir/.hgignore'到根''.ggignore'。但是這裏沒有必要,我的工作完全沒有它 –