How can just set write permission (unix chmod 0777) to a folder and git commit it in windows?

I use git in windows.

I know for set executeable file and commit it, can use this:

  • Log of remote history
  • Learning Git after Working with Subversion
  • Git clone multiple branches into same local directory possible?
  • How do I do many pull requests to a project on Github and keep my master updated at the same time while waiting for reviews?
  • Is there a way to change the file path for an Rstudio project?
  • git on mac os from homebrew: fatal: unable to access
  • git update-index --chmod=+x <file>
    

    But now, How can just set read and write permission (unix chmod 0777) to a folder and git commit it in windows?!

    And also I try git config core.filemode true and chmod 077 <folder> in Cygwin but does not work.

    Note that I am talking about folder and not file permissions.

  • git-svn problems creating tags
  • See if someone has any code left in the git repository
  • what is the authoritative config path for a git submodule
  • Dependencies between changes in different repositories using Gerrit
  • How should you keep a shared develop branch up to date with upstream changes on git?
  • Use git (windows) with a private key
  • 2 Solutions collect form web for “How can just set write permission (unix chmod 0777) to a folder and git commit it in windows?”

    You cannot. Git does not store the complete permissions for files, it only stores whether a file is executable or not. For folders, it stores no permissions at all.

    Your umask will influence the permissions that are used when folders are created on your local machine, but this is not something that can be committed to the repository.

    Since windows does not use the permissions bit(s) it has no effect under windows.

    One way to “force” git to track those changes is to work with the git Bash which will cause git to work in a Unix like environment and due to that you will be able to track changes made to the file permissions.


    Here is a working demo for you

    enter image description here

    Git Baby is a git and github fan, let's start git clone.