Sharing Git Branches on Different Workstations
Goal
Work on code changes on multiple workstations without pushing changes to central GitHub repo.
Workflow
Create a localized distribution that can be seen by the various workstations.
//myserver/develop/path/to/repo
This Git repo must be "bare" in order to accept pushes.[1]
> git clone --bare -l https://github.com/username/myrepo.git myrepo
Windows
Now on a separate windows workstation create a remote for that local hub:
> git remote add remotehubname x:\path\to\myrepo > git push remotehubname master
Mac
Mount the shared directory where the hub repo is located.
# optionally create a remote for the local hub $ git push /Volumnes/sharename/path/to/myrepo master
Notes
- ↑ Git bare vs non-bare repositories BitFlop Tutorials