Remove directory from git locally

I create my working directory using this git command: git clone git: //git.webkit.org/WebKit.git WebKit

Is it possible to delete a directory and its subdirectories locally, and yet it won't mess up my future 'git svn rebase' when I try to sync with a newer version of webkit?

Thank.

+2


source to share


2 answers


You can use git rm --cached to delete the directory locally. This will remove the files from version control.



+3


source


You can remove the directory and its files from your local repository with git rm

and make changes.

When you want to rebalance with an upstream branch, you won't have a problem as long as the upstream hasn't made changes to the files you deleted. Your changes can be applied without any interactive attention.



However, if the upstream changed any of these files, it git rebase

will show a conflict and ask you what to do. When this happens, you can resolve the conflict by deleting the file in the conflict and continuing to rebase. When you finish rebase, these files will still be removed in your local repository.

+2


source







All Articles