Switch to Git

I am developing and creating an iOS application, it is running a version with a local git repository. So far, I have had everything under version control, including large folders such as Design, full of my Photoshop assets, etc. Now I have added the remote location to the repo and obviously would not want to attach the Design folder to the remote computer.

I made a .gitignore file with the following:

 # File Extensions # ################### *.psd # Folders # ########### /Design/* 

which should exclude this folder and any Photoshop documents correctly?

How to undo the conversion of an existing design folder ( git rm actually deletes files!)? Also, when I divorce it, will it automatically reduce the huge .git folder?

Thanks a lot.

+4
source share
1 answer

Using git, you can use git rm --cached design/ , which will store the files.

To remove it from the whole story, you can 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

+12
source

All Articles