-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitSync 2.0.0 Adding Untracked Files #117
Comments
@ScottHamper the config shouldn't have changed but if you had custom I'm not entirely sure why plugins and config would have been pushed since you only have pages. Can you check your |
Hey @w00fz, I'm not using However, I can say that I was able to reproduce the issue with the example repo I put together for #102. Steps to reproduce:
BE WARNED!!! Despite the fact that Note that this issue is new to 2.0.0 for me - I reverted to 1.0.4 and cannot reproduce the problem. I still plan on diving into the code when I get more time, but hopefully this update helps in some way. |
Same problem for me, it looks like the .gitignore files is ignored |
I think I have found the problematic commit:
This commit commented out the code that only added/tracked the folders set in the EDIT: The issue is that |
What you are describing has been a long lasting hidden issue that like you noticed is now forced by always initializing the repository. Especially now where other users folders can be synchronized and not just pages The new version 2.0.1 (just released) introduces a I think it would be helpful to add in the documentation your case where a Grav instance gets initialized / restored through an automated or manual script. |
I have a question about the new git-sync init. Currently we deploy to AWS and have our Grav install in one repo that has no 'pages' or 'themes' directories under the users directory. However we have all our plugins and config there. When we deploy to an environment we have a build script that takes the Grav install and updates it based on environment. (Example script below) . As you can see we do a lot of work to bring in the other content (Pages && Themes) from the repo we have set up for the GitSync plugin. I have even added some extra .gitignore options to try and stop Grav from syncing the other directories back to our content repo. The reason for the overly complex script was to try and stop the extra syncing and an issue where git-sync sync expected the user/pages and user/themes directory there before it would sync. So Given all this should I only need to do this now with the git-sync init comman:
Original Script
|
Hey @ciddennis, That is exactly the idea, with the What you have there is a great example for testing that Pretty amazing how little you script became compared to before :) Cheers! |
Alright, So I've had some time today to try out the new
The The issue with the above script is that the Before 2.0.0, my script looked like:
So I tried going back to that, but tacking on a call to the new
However, despite I'm out of ideas of what else I can try. Is it possible to simply revert the change in 1ace4ae7648 that I linked to earlier and only |
So finally getting back (Forgot). so from the script I had above I change to have: buildspec.yml for AWS has this in the build phase.
In my set up I only sync themes and pages directories. I found I still have to do the last line as it would sync the master branch and leave it checked out even if in my git-sync.yaml I had told it to sync "stage". Minor issue. Thanks |
@ScottHamper I found an issue with Flex Objects about the gitignore not being properly updated, I am not sure if this will actually solve your original issue. See #197 |
Hey All,
I upgraded to GitSync 2.0.0, and after saving a page in the admin interface, a bunch of files that shouldn't be tracked/added to the repo suddenly got tracked/added.
My config is set up only to sync the
pages
folder, but after saving a page, the following changes were committed to the Git repo:plugins
folder got added (normally installed via a build script, and not version controlled)config/security.yaml
file got added (normally generated via a build script or Grav itself, and not version controlled)user
folder during build/deploy got deleted/removed from the repo (e.g.,.htaccess
is committed to the root of the project, but the build script moves it out ofuser
)I haven't had a chance to really dive in and discover the cause of these issues yet - I'll hopefully have time tomorrow - but I wanted to make you aware of the issue in case it's a larger issue that might impact other projects.
Has the config changed in 2.0.0? Right now, I have:
for configuring which directories should be synced.
You may be able to reproduce this issue with the same example repo I made for pull request #102 , as it reflects the structure of my real project, but I haven't tried it yet.
The text was updated successfully, but these errors were encountered: