Fast GIT Integration

A quick note on how to quickly transfer your files to on github and then deploy to your server.


Pre-add to the file .gitignore all files that may contain passwords or debugging information. For instance:

# security

This will secure access to the database if someone gets access to your repository.

Do not store in a gita, even if it’s private, settings from the database and any passwords.


Create a repository in GIT.

On my computer

We send our site to the created repository

git init
git add -A
git commit -m “first commit”
git remote add origin
git push -u origin master

On server

We go to the server in the directory where we want to pull up our site from git (it should be empty), and then we stumble to ourselves:

git clone “ nickname / repository-name.git” ./


On the server in the directory .git put the file .htaccess with content:

Deny from all

Manually add the missing files with passwords or connect to the database to the server. They are in guitaror and therefore will not go anywhere.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *