question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chmod change applied via `git update-index` is undone by committing in Desktop

See original GitHub issue

Description

The desktop app does not seem to support changing file permissions, at least on Windows. No functionality exists in-app for it to happen, and if it’s manually set on the command-line via git update-index --chmod=+x filename, the change will not be pushed.

Version

GitHub Desktop version: Chocolate-Covered Yaks (3.3.4.0) 50415df

OS version: Win7x64 (Microsoft Windows [Version 6.1.7601])

Steps to Reproduce

  1. git update-index --chmod=+x filename
  2. Edit other files, commit everything via desktop
  3. Push, realize chmod didn’t go with it, 😭

Expected behavior: Commit gets pushed with the chmodded file as well

Actual behavior: Commit was pushed perfectly well, other than the chmod missing

Reproduces how often: Tried it a couple times, seems to happen every time.

Logs

I’m not seeing any errors or other log entries different than a commit without a changed chmod.

Additional Information

doing a git update-index / git commit / git push on the command-line seems to push it fine on the same system.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
jsardellocommented, Jul 9, 2020

Slightly absurd that this still hasn’t been fixed. Thank goodness for the article posted above as a workaround.

4reactions
NedimCcommented, Aug 21, 2018

I am still having the same problem with this, don’t know if there is any solution for it yet. But I can neither do it from GitHub Desktop nor from IntellijIdea Terminal with git commands. Anyway I am a Windows user and found a solution for it by committing and pushing via “Windows Git Bash” as stated here https://medium.com/@akash1233/change-file-permissions-when-working-with-git-repos-on-windows-ea22e34d5cee This worked for me changing the mode of the file successfully image

Hope this helps other Windows users, cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically apply "git update-index --chmod=+x" to ...
Change the executable bit on the file's permissions and commit this change. ( chmod u+x $script as you pointed out). You only have...
Read more >
git-update-index Documentation - Git
If --refresh finds unmerged changes in the index, the default behavior is to error out. This option makes git update-index continue anyway. --ignore-missing....
Read more >
#git bot interface
Uncommitted changes are carried over; if they don't apply cleanly the whole operation rolls back. (2) 'git checkout [<commit>] -- <path>' = overwrites...
Read more >
Comitting after "git update-index --add --chmod=+x" doesn't work
create a new folder, run git init · open the folder as an idea project · create a new file test.txt , commit...
Read more >
Linux Lab — CS121 Main Page 1.0 documentation
Linux allows us to interact with the computer entirely through text using a program called the ... git commit -m"Made some changes to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found