Working on git repo without cd into directory

Starting with git 1.8.5, use the -C option.

git -C "/Users/michael/Development/Projects/opensource/dvsc-backup" status

Otherwise, you have to specify --work-tree as well as --git-dir

git --work-tree="/Users/michael/Development/Projects/opensource/dvsc-backup" --git-dir="/Users/michael/Development/Projects/opensource/dvsc-backup/.git" status

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)