Subscribe to NotarySojac's debian career        RSS Feed
***** 1 Votes

git (intermediate) - Keeping stuff out of your repo

Icon Leave Comment
Keep dumb stuff out of your git repo by adding it to your "git ignore" file!
$ vi .gitignore

What if it's too late and you already added something that you need to get out?

Remove sensative data from github
ref: http://help.github.c...sensitive-data/
To permenently delete and Erase the history of:

$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch config/database.yml' HEAD

$ git push origin master --force

Sometimes you need to force it:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch log/development.log' HEAD

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch lib/tasks/sample_data.rake' HEAD

$ git push origin master --force

0 Comments On This Entry


Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry