1

We set up our magento site in git.

When we run this command git status, we can see the following files as an image:

enter image description here

but as mentioned in above image "Marketplace OLD 3" directory does not exist in server.

We tried this command to delete it: git rm -r app/code/local/Webkul/Marketplace OLD 3 but we are getting error as:

fatal: pathspec 'OLD' did not match any files

So we added "Marketplace OLD 3" directory in server and tried to delete through git, but still it's not working.

How to hide or delete the above files from git terminal?

1

2 Answers 2

2

When you see deleted xxxxxx, It means you have deleted files but have not staged this modification. please use git add --update to stage it.

git rm will delete files and at the same time stage this deletion, so it will return error when you want to git rm not existing files.

Sign up to request clarification or add additional context in comments.

7 Comments

i used this : `git add --update' now all files showing in Green color, now how i can remove those files from terminal
Showing in green color means you can run git commit to commit your deletion now.
but i dont want to commit those files
@BabyinCoding Here commit means delete index of files from repository.
i iwll commit those fles
|
2

git clean -fd shall clean the files and directories not on the server from your local directory.

3 Comments

i found this error : fatal: pathspec 'OLD' did not match any files after running command
which directory are you running this command from? post running this command git either removes unused directories and files and return their pathname or returns nothing
i am running from root directory ,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.