When using git add .
uses the actual path where you're (incase is a git repo). How would I do for using git add
, git commit
and git push' outside of the working dir? Like
git add /Users/zad0xsis/my-git-repo`.
Can this be achieved?
gitrepository
When using git add .
uses the actual path where you're (incase is a git repo). How would I do for using git add
, git commit
and git push' outside of the working dir? Like
git add /Users/zad0xsis/my-git-repo`.
Can this be achieved?
Best Answer
I had success using the
git -C
option. Taken from the Git documentation:It is very important that the
-C
option comes before actual command you want to execute: