I'm designing and building an iOS app, it's under version control with a local git repository. So far I have had everything under version control, including the big folders such as 'Design' which is full of my Photoshop assets and such. I have now added a remote location to the repo and obviously would not want to commit the Design folder to the remote.
I made a .gitignore
file with the following:
# File Extensions #
###################
*.psd
# Folders #
###########
/Design/*
which should exclude that folder and any Photoshop documents right?
How do I unversion the existing design folder (git rm
actually deletes the files!)? Also, when I unversion it, will it automatically shrink the enormous .git folder?
Thanks alot.
Using git you can use git rm --cached design/
, that will keep the files.
To remove it from the entire history you could try something like :
$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch design/' \
--prune-empty --tag-name-filter cat -- --all
$ rm -rf .git/refs/original/
$ git reflog expire --expire=now --all
$ git gc --prune=now
$ git gc --aggressive --prune=now
ref : https://help.github.com/articles/remove-sensitive-data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With