Skip to content
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

Suggestion To Clean Up Contents In .gitignore File #31

Closed
zhongxiang117 opened this issue Aug 26, 2020 · 4 comments
Closed

Suggestion To Clean Up Contents In .gitignore File #31

zhongxiang117 opened this issue Aug 26, 2020 · 4 comments

Comments

@zhongxiang117
Copy link

Reason

This package is used for website generating, every bite inside its directory matters, if user wants to exclude some files, they can have their own way to set those exclusions before they start building, say, inside _config.yml file, so it is unnesscary to help user pre-set those ignores, especially when those settings may cause git file transferring problems.

Potential Problem

Inside current .gitignore file, it has the entries like

*.gem
*.whl

However, it has the great possibilities that user will happen to have some source files with the same file extensions that git ignores, then it will make differences between local & github-pages compiling, when no attention paid to .gitignores.

And I highly suspect that it may be the same reason that you removed entry *.html in early version's, because you are having _include/extra/footer.html & _include/extra/head.html files.

My Personal Complaining

Well, this can also be an example to show what I have struggled for.

I have two different and separated reporsitories for this package, they contain:

Repo.:               My github.io                 My Fork
Usage:                [gh-pages]                 [rundocs]

Core codes:           Up to date                 Up to date
CSS Format:           Formatted                  Compressed
.gitignore:            *.html                       (x)

Like above shows, every time whenever I committed changes of the package core codes, my github.io always complained some liquid files were missing, it cannot work as I expected in my local building. As a result, it took me more than two hours to find the reasons.

Reason: because of the *.html settings, the git simply skipped the full _include/extra folder when makes comparisons.

With the help of local .gitignore file, it will be very convenient to make commits to rundocs git official reporisitory, however, it is highly possible that the user may have any files happen to match any one of entry in default .gitignore settings, thus as a consequence, it will ruin github.io page renderings.

Alternative Solutions To git-ignores

You can set those settings as the global ignores when you are doing developments, like in ~/.gitignore or ~/.config/git/ignore or ~/.gitignore_global.

Link: global-gitignore

Once again, this package is not a one time build-to-use package, it dynamically updates whenever the server starts running.

As a conclusion, please clean up the contents inside .gitignore file, thank you!

@ghost
Copy link

ghost commented Aug 26, 2020

@zhongxiang117
*.gem is only for this repo local build theme use!
*.whl is only for this repo download origin sphinx_rtd_theme theme use!

About jekyll-remote-theme gem plugin, you can see the source code for witch file is included

_includes
_layouts
_sass
assets

No _data dir and any more files!

@ghost
Copy link

ghost commented Aug 26, 2020

global-gitignore is not recommends

@ghost
Copy link

ghost commented Aug 26, 2020

Keep update the theme, github pages use remote_theme and local use ruby gem

Blow option for remote-theme method compress css!

sass:
  style: compressed

@zhongxiang117
Copy link
Author

You may misunderstand what I am saying.

Let we think a scenario, suppose a new user wants to use this theme to support his/her blog or to release documents. As usual, s/he needs to Fork or Download this theme first, in either way, s/he has the default .gitignore in his/her repository.

And probably, s/he may be not aware those git-ignore entries.

It has great possible that s/he may need to pre-check their contents before they really online-git-publishing.

It works well in their local building.

However, if it exists a file happening to match git-ignore rules, then what will happen in next?

Those ignored files will not be published to their online git repository.

Therefore, it will cause differences between the local repository and remote git repository.

This is the Potential Issue that I am talking about.

It is not about how do you set your own .gitignore for developments, it is about the hidden problem between user's local and git-remote repository.

This package is not a one time build-to-use package, the user needs to constantly make relations between their local and git-remote repositories, thus please do not help user set those .gitignore options.

And I guess it also is the reason that that you removed *.html option in the early version's.

The global-gitignore is only a suggestion for you to make your local repository works like your current settings.

So, I still strongly suggest to remove all contents in offical package .gitignore file.

@ghost ghost closed this as completed Sep 6, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant