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

Reworked .gitignore #20

Merged
merged 4 commits into from
May 11, 2017
Merged

Reworked .gitignore #20

merged 4 commits into from
May 11, 2017

Conversation

pkamps
Copy link
Member

@pkamps pkamps commented Oct 10, 2016

Reworked .gitignore to ignore additional extensions and settings - var folder now empty with just a dedicated .gitignore file.

It would allow you to clone the project and add client specific extensions, settings and assets (in the var dir) without having those showing up as new files.

… folder now empty with just a dedicated .gitignore file
@benkmugo
Copy link
Member

+1, merge away.

@ernestob
Copy link
Member

I think it is a better approach to keep the ignoring rule for the var folder in the global .gitignore file. This way all the ignore rules are in one place.

This is the approach I have used to handle git disability to track empty directories.
I usually add a .gitkeep file

# Ignore everything from the /var directory
/var/*
.
.
.
# Add this to the end of the .gitignore file
# Except for any .gitkeep file in the tree. This is added only to keep directories in the repository.
!.gitkeep

Having this in place and whenever I need to track a directory, all I need to do is this touch my_empty_dir/.gitkeep, no need to add anything in the file.

@pkamps
Copy link
Member Author

pkamps commented Nov 30, 2016

I agree it's cleaner to just have a single .gitignore file. Pull request adjusted.

@peterkeung
Copy link
Member

As discussed just now, the addition of the extension and settings rules seems catered to committing back to this repo only. We need to consider how this will get used on actual client projects.

@pkamps
Copy link
Member Author

pkamps commented Mar 12, 2017

I now changed it. The new version is a better fit for client projects: only ignoring everything in the var folder. To keep the var folder it now contains a '.gitkeep' file.
This pull request is also removing var/webdav/root/info.txt a superfluous file.

@benkmugo
Copy link
Member

@pkamps the .gitignore is missing the .gitkeep exclusion rule that Ernesto mentioned no?

@pkamps
Copy link
Member Author

pkamps commented May 11, 2017

You're right - I updated .gitignore now

@benkmugo
Copy link
Member

+1

@pkamps pkamps merged commit 53fbbc8 into master May 11, 2017
@pkamps pkamps deleted the gitignore-reworked branch May 11, 2017 21:16
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

Successfully merging this pull request may close these issues.

4 participants