Open main menu

Changes

725 bytes added ,  09:30, 17 November 2017
hack about file modes
== 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 ==
4,558

edits