Bureaucrats, confirmed, Administrators
4,558
edits
(rebase) |
(hack about file modes) |
||
Line 1: | Line 1: | ||
== Ignore File Mode == | |||
Sometimes you have to temporarily change file modes (or some script might alter your working directory). Anyway, to ignore file mode changes temporarily, you can just add <code>-c core.fileMode=false</code> to your command. E.g.: | |||
<source lang="bash"> | |||
git -c core.fileMode=false status | |||
</source> | |||
You can also put this into a repo or global config, but you probably shouldn't. | |||
If you need to change filemodes back to the way they were in the repo, you can do something like | |||
<source lang="bash"> | |||
git diff --summary | grep --color 'mode change 100755 => 100644' | cut -d' ' -f7 | xargs chmod +x | |||
git diff --summary | grep --color 'mode change 100644 => 100755' | cut -d' ' -f7 | xargs chmod -x | |||
</source> | |||
== Working on a remote terminal == | == Working on a remote terminal == | ||