Wednesday, December 30, 2009

Git and Unfuddle for python project - using .ignore

This is a reminder to me in case I forget how I got this working.

Main development environment is local laptop
Master reponsitory on
Live environment on remote server

There are a few files, like, that I don't want to be synced and as these files were already in the repository I'd created, git kept trying to sync them.

To resolve:
Assuming already have everything setup - remote server setup with clone from unfuddle.

Create .gitignore file as part of repository:

Remove from git without deleting on both local and remote environments.

In Local environment:
git rm --cached
git commit -a -m "remove"
git push unfuddle master
In remote live environment
git rm --cached
git commit -a -m "remove"
git push

That should do it. Now commits can be exchanged without being updated.

No comments: