Re: file permissions in Git repo
- From
Jeff King <peff@peff.net>
- Date
- Jan 17, 2014, 02:26 UTC
- Message-ID
- <20140117022623.GC12444@sigill.intra.peff.net>
- In-Reply-To
- <1389916737.92225.YahooMailNeo@web124906.mail.ne1.yahoo.com>
On Thu, Jan 16, 2014 at 03:58:57PM -0800, SH wrote:
Show 5 quoted lines
> We have a repository which holds lots of shell and perl scripts. We add the > files to repository (from windows client) with executable permissions (using > cygwin) but when we pull that repository on another machine (windows or linux), > files dont have executable permission. Can you please provide a solutions for > this?
Git does not preserve file permissions _except_ for the executable bit. So this should be working.
However, I suspect that `core.fileMode` is set to `false` in your repository, which causes git to ignore the executable bit. When a repository is initialized, we check whether the filesystem simply creates everything with the executable bit. If so, we turn off core.fileMode for the repository (since otherwise every file would have it set).
-Peff