Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8661701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:33:39+00:00 2026-06-12T16:33:39+00:00

When I pull change from my repositories, Git change the file permissions (actually, he

  • 0

When I pull change from my repositories, Git change the file permissions (actually, he change the group write permission).

If I’m correct, Git should only track executable bit and this anyway can be removed using setting core.filemode to false.

But, although the filemode is set to false (in local, global and user), when I pull, write permission constantly change.

I could use a git-hooks in order to reset correct chmod, but this is some overhead and I’d prefer if there’s a way to just ask git to completly ignore file mode change.

Anyone know how to achieve this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:33:40+00:00Added an answer on June 12, 2026 at 4:33 pm

    One config setting that might help here is core.sharedRepository, presented in the blog post "Preserving Group Write on Git Objects in a Collaborative Repository":

    The solution turned out to be fairly straightforward.
    In the file .git/config, I added a line that read: "sharedRepository = group", like so:

    [core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        sharedRepository = group
    

    Thereafter, new files in .git/objects were created with the proper permissions for group write.
    (However, note that new files are group-owned by the primary group of the user account via which the push was received. If the users collaborating on the project have different primary groups, and if those users do not share membership in that set of groups, you may still run into problems.)

    Make sure of the value of your umask:

    Example: 0660 will make the repo read/write-able for the owner and group, but inaccessible to others (equivalent to group unless umask is e.g. 0022).


    2022 (10 years later), SyedAsadRazaDevops adds in the comments:

    In Ubuntu (Linux), just go to the project repo and run this command nano .git/config and add sharedRepository = group in [core] section.

    That would be the same as:

    cd /path/to/repo
    git config core.sharedRepository group
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After a Git pull, its output gives a summary on the change amount. How
So I see Git doesn't recognize folders, or should I say when the only
I want to pull all info about a file from a files table, but
I followed the steps from Change old commit message on Git , and I
I recently received a forced update warning from git on a repository which only
We're trying to modify out NANT build script to pull changes from our remote
I've forked a Mercurial repository, and now I want to pull the changes from
I would like to inspect any code changes after doing a git pull .
I pull markers' data from a MYSQL database using SQL and build up an
I'm trying to pull data from the YouTube API into a local MySQL table.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.