بسم الله

Bismillah

Local Remote Directory Git in GNU/Linux System

Suggested solution

Open your favorite terminal, change to work directory

cd ~/Dropbox/Git

Make directory with extension .git

mkdir myapp.git 

Create an empty Git repository or reinitialize an existing one

git init --bare myapp.git

Move to your directory project ex:

cd ~/www/myapp/

Initialize an existing one with the command

git init .

Create some file ex: myfile.txt

echo "Control Git Local to Dropbox Folder " > myfile.txt

Add your file to versioning control with command

git add myfile.txt

Commit the file after done creating or editing

git commit -m "my file version 1.0"
[master (root-commit) 0220f05] Add a test file
1 file changed, 1 insertion(+)
create mode 100644 myfile.txt

Remote local to dropbox folder

git remote add origin ~/Dropbox/Git/myapp.git

Push to dropbox

git push -u origin master
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 458 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
To /home/abdullah/Dropbox/Git/myapp.git
* [new branch]      master -> master
Branch master set up to track remote branch master from origin.

الحمد لله

Linked Refrences: