Guest User

Untitled

a guest
May 20th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. If you have a shared Git repository on a shared directory on a multiple user Mac
  2. and you cannot edit anything because the repo belongs to the other user,
  3. you can fix that by:
  4.  
  5. First, grant yourself the permission to all files (recursively):
  6.  
  7. ```shell
  8. cd <YOUR-SHARE-GIT-REPO-PATH>
  9. sudo chmod -R 777 $(pwd)
  10. ```
  11.  
  12. Now your (stupid) Git client app showing all the files as edited, just have the courage to reset (hard).
  13.  
  14. ```shell
  15. git reset --hard
  16. ```
  17.  
  18. Do the same thing to every submodule.
  19.  
  20. ```shell
  21. git submodule foreach 'git reset --hard'
  22. ```
  23.  
  24. Btw, if you're not a Mac admin user: good luck !
Add Comment
Please, Sign In to add comment