I tried clone but didn't work.
I'm not familiar at all with Sourcetree, but what did not work cloning locally?
~\Git\AD9834 [master ≡]> git clone . ..\ADclone
Cloning into '..\ADclone'...
done.
~\Git\AD9834 [master ≡]> Get-ChildItem ..\ADclone\
Directory: C:\Users\newbrain\Git\ADclone
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 2021-11-07 00:50 Inc
d---- 2021-11-07 00:50 Src
[...]
~\Git\AD9834 [master ≡]> cd ..\ADclone\
~\Git\ADclone [master ≡]> git remote -v
origin C:/Users/newbrain/Git/AD9834/. (fetch)
origin C:/Users/newbrainGit/AD9834/. (push)
~\Git\ADclone [master ≡]>
Of course the target directory can be on any reachable path.
As you can see, the newly created clone already has its remote set to the the cloned repository.
If you commit there, just do "git push origin" to update the original directory.
If you prefer, instead, to work on the original directory and then update the clone, you need to remove (optional, but advised to avoid mixups) the remotes from the clone:
~\Git\ADclone [master ≡]> git remote rm origin
~\Git\ADclone [master]> git remote -v
~\Git\ADclone [master]>
And set them in the original repo, "origin" is the default choice, but any name will work:
~\Git\AD9834 [master ≡]> git remote add origin ..\ADclone
~\Git\AD9834 [master ≡]> git remote -v
origin ..\ADclone (fetch)
origin ..\ADclone (push)
~\Git\AD9834 [master ≡]> git push origin
Everything up-to-date
~\Git\AD9834 [master ≡]>