Homestead: .homestead folder

Created on 16 Feb 2017  ·  16Comments  ·  Source: laravel/homestead

What if we stopped putting .homestead in the user's home folder and just put the files in the current folder (where the init script is run from)? We can just add it to .gitignore

https://twitter.com/claptr0/status/832296864745652225

help wanted question

Most helpful comment

@svpernova09 seems like either development should be moved out of master or the docs updated to have users pull a tag (e.g. stable or a specific version).

Right now anyone following https://laravel.com/docs/5.4/homestead is going to get the master branch by default via the git clone https://github.com/laravel/homestead.git Homestead command in the instructions.

From your comment it sounds like this would result in a broken setup for them until the new laravel/homestead box is also released.

Also FWIW (to no one in particular) I ended up just creating symlinks so I could keep ~/.homestead intact which I version in github along with several other configurations in my home dir.

All 16 comments

I thinks that so is more clear, why two folders?

If it's the same folder we'd have to shuffle some files around. Which isn't an issue.

Late to the party, but to answer "why two folders?" it's because user configuration is generally separated from application files (in this case, the Homestead checkout from github).

http://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#requirements4a

User specific configuration files for applications are stored in the user's home directory in a file that starts with the '.' character (a "dot file"). If an application needs to create more than one dot file then they should be placed in a subdirectory with a name starting with a '.' character, (a "dot directory").

Personally, I preferred ~/.homestead/ as the location for the user-specific Homestead.yaml and other files on mac/unix-like systems.

With this change my custom configuration is now commingled with the "vendor" files (e.g. the github checkout). I'll have to remember not to rm -rf the Homestead checkout without saving a copy of my config files whereas before it was very clearly separated and in a location I expect other config to live (which I backup regularly, migrate to new systems, etc.)

</opinion> (still ❤️ 🏠-stead anyway 😉 )

This broke Homestead for me after a vagrant box update and git pull origin master

I had to edit the Vagrant file back to ~/.homestead to get things running again.

Should I now be moving the ~/.homestead dir to within the Homestead folder?

@liamvictor You shouldn't be running master from Homestead. git checkout v4.0.5 will fix the issue.

Thanks for your help Joe.

You shouldn't be running master from Homestead.

I'm sorry I don't know what you mean there. I had run the update commands as per the docs.
Do you mean I should switch a new branch to make edits?

git checkout v4.0.5 will fix the issue.

Thank you.

To stay current with the development though, would moving the ~/.homestead folder into ~/Homestead be preferred?

Currently in order to use the master branch of Homestead you need a new base box that I have not yet publicly released as laravel/homestead. Running git checkout v4.0.5 will check out the latest stable release of Homestead and continue to work with ~/.homestead.

Oh I see! Thank you again.

@svpernova09 seems like either development should be moved out of master or the docs updated to have users pull a tag (e.g. stable or a specific version).

Right now anyone following https://laravel.com/docs/5.4/homestead is going to get the master branch by default via the git clone https://github.com/laravel/homestead.git Homestead command in the instructions.

From your comment it sounds like this would result in a broken setup for them until the new laravel/homestead box is also released.

Also FWIW (to no one in particular) I ended up just creating symlinks so I could keep ~/.homestead intact which I version in github along with several other configurations in my home dir.

This sudden move of the files is not a very user friendly way of doing things.

We have deprecation for a reason.

Either copy the files from the old folder when they exist or continue working with a depration waring and give everyone time to sort it out.

@Fuxy22 I'm open to suggestions for a deprecation system to routinely warn the user about things, but outside of a Vagrant plugin I'm just not aware of any way to implement such a thing.

We use Semantic Versioning so that when you see a major version change you should expect things to break and review any documentation changes before upgrading.

We had the official docs https://laravel.com/docs/5.4/homestead updated nearly 48 hours before releasing 5.0 and the morning we released 5.0 I had Eric publish Homestead V5.0.0 Is Released https://laravel-news.com/homestead-v5 which is the most detailed description of changes that I've seen for any Homestead release. The very first change listed is in fact instructing you on where these files are and that if you are upgrading, you'll want to copy changes to the new location.:

What’s New in Homestead 5.0.1

New Stuff

There’s no more .homestead folder! The days of hunting for your dot folder are over. Your particular Homestead configuration files will now be copied to the same folder as Homestead. To upgrade, just run the init script again, then copy any changes to Homestead.yaml, aliases, and after.sh to the newly created files.

I can empathize with you, it was a bit of a jarring change. we refactored nearly all of the make command in this release, we moved a bunch of files around. This was a major version jump, this was the time to break backwards compatibility.

What do I do if I my Homestead.yaml and aliases are in the resources file?

You need to run the init.sh (or init.bat on windows) make sure you follow the docs.

--

  • Joe Ferguson
    JoeFerguson.me
    MemphisPHP.org

On Apr 4, 2017, 01:47 -0500, PUSKAS6 notifications@github.com, wrote:
>

What do I do if I my Homestead.yaml and aliases are in the resources file?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (https://github.com/laravel/homestead/issues/465#issuecomment-291409241), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA7CwuR6SExxEKK0N8holtTeTmb7mzUYks5rseeKgaJpZM4MDYra).

Thank you Joe, I'll try that.
Cheers Jeff.

Hi,
I have a question, I have tried to install Homestead but was having problems with it so removed it along with Vagrant. Now when I reinstalled it there was not a ~/.homestead. Is this something that has now been removed or is it an issue caused by uninstalling badly then reinstalling?
I am quite new to coding and very new to Laravel
I would appreciate any assistance that you can give
Thanks
Peter

Hi Peter, we removed the .homestead folder in a previous version. Now all the files are stored in the Homestead folder once you run the init.sh or init.bat

--

  • Joe Ferguson
    JoeFerguson.me
    MemphisPHP.org

On May 13, 2017, 14:36 -0400, Peter Ayello Wright notifications@github.com, wrote:
>

Hi,
I have a question, I have tried to install Homestead but was having problems with it so removed it along with Vagrant. Now when I reinstalled it there was not a ~/.homestead. Is this something that has now been removed or is it an issue caused by uninstalling badly then reinstalling?
I am quite new to coding and very new to Laravel
I would appreciate any assistance that you can give
Thanks
Peter


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (https://github.com/laravel/homestead/issues/465#issuecomment-301266546), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA7CwnNc0uDOUXv_TnyM4oO10mUxxQOBks5r5fg-gaJpZM4MDYra).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cschoeni picture cschoeni  ·  4Comments

pqt picture pqt  ·  3Comments

dorinniscu picture dorinniscu  ·  4Comments

svpernova09 picture svpernova09  ·  3Comments

mattmcdonald-uk picture mattmcdonald-uk  ·  3Comments