Entries in git are always executed in the local repository clone. The idiomatic way to share changes in git is to git pull from a remote repository to " git pull " any changes.
For example, you can clone the linux repository of the Linux kernel Linus Torvalds by doing
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
You can then make new changes regularly by doing
git pull
The repository is not specified here in the pull command because the default repository is used.
If you have an interesting patch for the linux kernel, you can make your repository publicly host it with gitosis or other software, then you just need to convince Torvalds of git pull from you; -)
Typically, developers also distinguish between their private and public repositories. You can use "git push" to push changes from your personal to a shared public repository.
source share