Hello, Why not keeping a non-bare repo on the USB drive instead? But there are two drawbacks here.
The first one is obvious: it will take much more space, as something is always checked out. The second one is a bit more subtle: you can push to a non-bare repo, but you canʼt push to its checked out branch directly. Eg. if you checkout master on the USB drive, you canʼt do git push us-drive master. As a workaround, you have to git checkout another-branch (on the USB drive), git push usb-drive master (on the PC), and git checkout master (on the USB drive again). Best, Gergely On Wed, Jan 24, 2018, 23:10 Pankaj Azad <pankaja...@hotmail.com> wrote: > I have a very specific scenario in mind which could be irrelevant to most > git users but let me spell it out. > I work on 2 machines not connected via LAN etc. I keep my work synced > between them by having a bare repo in usb drive and using push,pull/fetch > mechanism of git. I also want to be able to read my repo in usb drive on > any other pc. I have explored many existing script/hooks based > solutions but none met my expectations. So I made a feature request. I > realize that majority of users might not find it useful but there could be > a few users like me who would. Moreover if work starts in this direction > then over a period, after undergoing multiple refinements it could shape > into a useful feature. > PS: I have thought about having the usb drive encrypted and in fact am > currently using that. But then I want to have some unencrypted part in > that. Creating and maintaining partitions in pen drive comes with its own > problems when used across different operating systems > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.