Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why my all index is change in my git project

Tags:

git

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

like image 930
hardik Avatar asked Oct 30 '22 15:10

hardik


1 Answers

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 .
like image 166
VonC Avatar answered Nov 15 '22 06:11

VonC