using cloud space as a private git repo

copyright (C) qingfeng Xia 2011-2020 CC-BY-NC 4.0

[answer from stackoverflow]

It is absolutely possible – what you probably want to do is create a “bare” git repository in folder Y (git init --bare)

and then add that file location as a remote:

git remote add Y file:///path/to/Y
#example path: file:///media/sf_OneDrive/gitrepo/FenicsSolver/
======= push and pull has different repo ==========
git remote set-url origin --push --add <a remote>
git remote set-url origin --push --add <another remote>

========push to multiple repo======

The latest version of git (as of October 2012) allows you to do this from the command line:

git remote set-url origin --push --add user1@repo1
git remote set-url origin --push --add user2@repo2
git remote -v

It is also possible to push encrypted code to public repo, not tested.



CC-BY-NC 4.0 licensed free for non-commercial usage
Author: Qingfeng XIA
copyright (C) 2011-2020
http://www.iesensor.com
please keep the original link in your reference.
http://www.iesensor.com/blog/2017/09/24/using-cloud-space-as-a-private-git-repo/
This entry was posted in Uncategorized. Bookmark the permalink.