I work with git in my laptop computer (a mac) but sometimes have to use my code in a desktop machine (windows) to which I have no administrator access and which is also not connected to the internet due to security reasons.
I want to use git in that machine as well, but the IT personnel at my workplace has told me that it is not possible to install it in that particular computer room.
I have seen this thread about portable GIT (How to install Github on USB Drive?), but it seems to work only on Windows. Is there any way to make it work in both windows and mac?
I have seen threads here about how to use USB as a portable repository by starting a bare repo and cloning the contents to the other machine. I have also thought about cloning that same repo to the USB from my remote. All these solutions are not feasible because that desktop machine I want to work with has no git installed and I can't commit or do any git operation when there.
Is there any way I can have a git installation in my USB and have it working both in my laptop and in that work desktop? Can it work between two different OSs (Mac and Windows)?
Thank you for your appreciation.
Use a normal git repo on the usb drive.
Use UTF-8 as encoding for all the files to make sure that you won't get any problems with that
Before you go to your windows machine, make sure that you have checked out the branch that you want to work on.
Use the checked out files and work with them.
Back at your mac, you can commit and push and do whatever you like.
OR
Use your smartphone as usb drive. If you have Android, you can install botbrew on it and use git on your mobile. With that you can do your git operations while at your windows pc.