Your Web Guru

Uploading an existing project to Chaw using git

This is for users of thechaw.com. It is a project repository for CakePHP projects.

Change directory to your application’s working path. This will be inside of your “app” directory.
example:
cd /htdocs/app

Setup git locally.
git init

Add link to the remote repository.
git remote add upstream git@thechaw.com:projectname.git

Edit .gitignore to include the following:
tmp
tmp/*
config/database.php

*Note for Mac users, it is advantageous to also add .DS_Store

(Optional)
This is HIGHLY recommended. This prints out a list of files that would be added, so you can make sure there aren’t extra libraries or other files
git add . --dry-run

Add files to commit.
git add .

Commit files.
git commit -m "Initial commit of project files"

Upload to the repository.
git pull upstream master
git push upstream master

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>