Difference between revisions of "Git pull writable"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Tips]] | [[Category:Tips]] | ||
<pre> | <pre> | ||
#Bash function to make git | #Bash function to make git clones writable (annoyingly, if you clone repository, some files are non-user-writable... which after compiling dangerously tempts 'sudo rm -rf!') | ||
git() | git() | ||
{ | { | ||
if [ $1 = "clone" ]; then | if [ $1 = "clone" ]; then | ||
command git "$@" && | command git "$@" && chmod -R u+w */.git; | ||
else | else | ||
command git "$@"; | command git "$@"; |
Latest revision as of 07:22, 23 June 2020
#Bash function to make git clones writable (annoyingly, if you clone repository, some files are non-user-writable... which after compiling dangerously tempts 'sudo rm -rf!') git() { if [ $1 = "clone" ]; then command git "$@" && chmod -R u+w */.git; else command git "$@"; fi; }