Alexander Osipenko wrote:
> I'm working in different places, some with limited internet access,
> and need to have local copy of my repository on usb stick.
> 
> With Mercurial the task is easy:
> configure stick = /media/stick/my/repo and
> hg push stick/hg pull stick synchronizes my work.
> 
> No doubt it's possible with git also.
> But on the first try, git pulls only the current branch.

Yes, git push and pull always operate on branches. Branches are a
very central concept for git.


> Could you tell how such local repo should be configured?

git push --help says to run git config remote.stick.mirror true and
after that you will be able to mirror the local repository to the
remote using git push. Note that git pull can not be used to do
mirroring, only git push. You should add a remote on the stick
repository for the other direction.

Note that mirroring deletes everything in the receiving repository
that does not exist in the local repository, so take care to run the
push in the correct place.


//Peter

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to