Git clone writable: Difference between revisions

From SlackWiki
Jump to navigation Jump to search
No edit summary
m (Dchmelik moved page Git pull writable to Git clone writable)
(No difference)

Revision as of 04:48, 27 July 2022

# bash function to set git clones user-writable (annoyingly if you clone repository some files are non-user-writable... dangerously tempts 'sudo rm -rf'!)
  if [ $1 = "clone" ]; then
    command git "$@" && chmod -R u+w */.git*;
  #you may prefer
  #  command git "$@" && rm -fR */.git*;
    command git "$@";