-
-
Save tedtop/7395371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on: http://stackoverflow.com/questions/2218075/using-git-with-your-cakephp-project | |
# Procedure: | |
# 1. Remove tmp/ from .gitignore | |
# 2. touch tmp/.keep | |
# 3. git add tmp/.keep | |
# 4. git commit | |
# 5. Add tmp/ to .gitignore | |
# Clean tmpfiles and delete .gitignore | |
rm .gitignore | |
rm -rf tmp | |
# Set up directories | |
mkdir -p tmp/cache/models | |
mkdir -p tmp/cache/persistent | |
mkdir -p tmp/cache/views | |
mkdir -p tmp/logs | |
mkdir -p tmp/sessions | |
mkdir -p tmp/tests | |
# Make the directories itself writeable | |
chmod -R 777 tmp | |
# Add .keep files to the directories | |
touch tmp/cache/models/.keep | |
touch tmp/cache/persistent/.keep | |
touch tmp/cache/views/.keep | |
touch tmp/logs/.keep | |
touch tmp/sessions/.keep | |
touch tmp/tests/.keep | |
# Add all files to stage | |
git add tmp/* | |
# Commit the changes | |
git commit -m "Set up tmp dirs" | |
# Add tmp/* to gitignore | |
echo "tmp/*" > .gitignore | |
# done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment