0

i accidently added some of storage files to my git repository that i want to remove them from local machine now but they have to remain on server . so what i did is cloning the project on my local machine and then added this line to my .gitignore :

/storage/app/public/product 

and after that i removed the files from my local machine. now when i make change on other files it tries to commit the changes which was made on that files and tries to remove them on repository too . now what i want is 1-remove them from local machine and not commit them 2-remove them from repository and it wont remove them on live server

1

1 Answer 1

0

Remove git cache by running below codes

git rm -r --cached . 

Then:

git add . 

And at the end commit

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

1 Comment

Doesn't answer poin 2: the files will be removes from the server.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.