How to remove a directory from git repository ?

How to remove a directory from git repository ?

Asked on December 27, 2018 in Git.
Add Comment


  • 3 Answer(s)

    Git and local you can eliminate the directory

    Checkout the master directories:

    git rm -r one-of-the-directories
    git commit -m "Remove duplicated directory"
    git push origin <your-git-branch> (typically 'master', but not always)
    

    Eliminate directory from git but NOT local

    You canĀ remove this directory from git but not delete it entirely from the local filesystem .

    Use this:

    git rm -r --cached myFolder
    
    Answered on December 27, 2018.
    Add Comment

    Directory delete the file from the browse system.

    git add -A
    
    

    Next

    git commit -m 'deleting directory'
    
    

    Another

    git push origin master.
    
    Answered on December 27, 2018.
    Add Comment

    Try this: git rm -rf <directory_name>

    Directory you canĀ  force to delete

    Answered on December 27, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.