开发者

Reset local Git permissions to that of the remote

anyone know how to reset the local git file permissions t开发者_开发问答o match that of the originals on github? I chmod -R all the files so I wouldnt have to enter a password everytime I modified them. And now all the files are different.

Thanks!


git read-tree --reset -i 4b825dc642cb6eb9a060e54bf8d69288fbee4904
git clean -dfx
git reset --hard

Consider thinking about the git-config core.sharedRepository if you need to chmod stuff a lot.

Note that will delete EVERYTHING THAT IS NOT COMMITTED. Be very careful that everything is committed or stashed or something.

Also note that this does not necessarily match what someone else would get if they checked out. Specifically it honors your umask during the checkout process.

Oh, and the 4b825d… SHA is the magic SHA which represents an empty tree. So we first make the index empty, then we delete everything in your repo which isn't in the index (everything) and then we reset the index and working directory back to HEAD.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜