modmore / Gitify

Command line toolkit to make managing a MODX site in git a lot easier.
MIT License
122 stars 55 forks source link

Gitify extract issues #94

Closed sonicpunk closed 9 years ago

sonicpunk commented 9 years ago

Many times when I run Gitify extract, strange changes takes place. For example in a template the MODX placeholders will be missing, and in my context settings, there will be some that disappear and an emtpy .yaml file will be written.

my gitify file is written so:

data_directory: _gitify/ backup_directory: _backup/ data: contexts: class: modContext primary: key context_settings: class: modContextSetting primary: [context_key, key] exclude_keys:

packages: modx.com: service_url: http://rest.modx.com/extras/ packages:

Mark-H commented 9 years ago

What happens when you do Gitify extract --verbose, what do you see in that log about the items that go wrong?

sonicpunk commented 9 years ago

so the context setting that always gets deleted shows this:

But it did exist and I did not delete it.

It also always writes an empty .yaml file in the context_settings directory as well

sonicpunk commented 9 years ago

I checked the database and found that there was an empty row in the table. I deleted it, and now it works fine.

jxarms3 commented 5 years ago

my env: git remote: AWS EC2/GNU/LINUX git local : windows 10, mysql, using GIT BASH client

I have a site working locally. I have a Gitify workflow working. Only hangup is that when ever I do a local Gitify extract, I get the dreaded crlf warning for every file in my project. I have tried to remove this error by: git config core.autocrlf true/false ---- NO EFFECT ------ All files are still marked by this annoying crlf warning rendering my workflow unuseable. Several people tell me to google how git handles lf -> crlf conversion. I did, but the common solution has NO effect. What do I do?

Mark-H commented 5 years ago

This is an issue that was closed almost 4 years ago, which also has nothing to do with lf/crlf issues at all... was this honestly the best place you could find to post? :/

https://help.github.com/articles/dealing-with-line-endings/#platform-all is a pretty good read on the topic.

For windows the suggest value is true, for OS X / Linux it's input. You'll need to make sure that's set properly on each environment. You don't mention using the --global flag there. Not sure if that's intentional, but I do recommend using global so it's fixed in all your projects on that machine.

Now, just changing your git config is not sufficient.

If you have existing files or existing history in git, you'll need to deal with it once to set the line endings properly in the files. Again, great resource, this walks you through that: https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

As others have told you, this is really not a Gitify specific issue.

Line endings when dealing with multiple machines suck. Sorry I can't fix that for you.

jxarms3 commented 5 years ago

Thanks and understand mark

Sent from my iPhone

On Jan 23, 2019, at 6:02 PM, Mark Hamstra notifications@github.com wrote:

This is an issue that was closed almost 4 years ago, which also has nothing to do with lf/crlf issues at all... was this honestly the best place you could find to post? :/

https://help.github.com/articles/dealing-with-line-endings/#platform-all is a pretty good read on the topic.

For windows the suggest value is true, for OS X / Linux it's input. You'll need to make sure that's set properly on each environment. You don't mention using the --global flag there. Not sure if that's intentional, but I do recommend using global so it's fixed in all your projects on that machine.

Now, just changing your git config is not sufficient.

If you have existing files or existing history in git, you'll need to deal with it once to set the line endings properly in the files. Again, great resource, this walks you through that: https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings

As others have told you, this is really not a Gitify specific issue.

Line endings when dealing with multiple machines suck. Sorry I can't fix that for you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.