5

I am using GitLab for my project repository.
From past few week I have not committed my project hence I was only coder in it.
Now when I am trying to commit my project, it shows me that my all file has made any kind of changes.

So i try git diff command: here I am attaching screenshot of what result I got. It is clearly show me that all index file has been changed.

I had tried google to solve problem but I failed in it.
So finally here I am to get solution. I do not want to commit my all files

enter image description here

1 Answer 1

2

For file permission mode, clone again your repo after:

git config --global core.filemode false 

Then from your new cloned repo, do a

git --work-tree=/path/to/old/cloned/repo add . 

That will import your actual changes into the new cloned repo.


If you want to keep your current repo (with its changes) you can see the difference with git diff, as I mentioned in this answer.
Note that since Git 2.9.1, you can change the permission of a file with

git add --chmod=-x . 
Sign up to request clarification or add additional context in comments.

6 Comments

git --work-dir=/path/to/old/cloned/repo add . is not working
You can type it from any folder: it is a global configuration that will apply to all git repositories.
Unknown option: --work-dir=/home/hardik/lampstack-5.6.26-2/apache2/htdocs/WhitePanda-v3.0-Collaboration/ this is message i get
@hardik sorry, it was git --work-tree, not --work-dir. I have fixed the typo in the answer.
It needs to be executed from your newly cloned repo
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.