I have exhaustively searched for answers to my question here and on Google. I have found some great resources and learning tools for understanding Git and what it does, but I need to get some clarification, and assistance.
What I am doing is working on a side-project for work both at my office and at home. (I'm migrating C# code to Java to help me learn both languages.)
The setup:
Note: Using Github is not an option.
Purpose/Goal:
What I am trying to do is keep the code as much in order, with version control, as possible by using Git, but in setting it up at work, for some reason I'm a bit afraid it won't work the same when I get home. (Side note: I sense a "This is of the beauty of git." type answer somewhere.)
My questions are:
Sorry for the length, but I wanted to provide as much information as possible. Thanks ahead of time for any information anyone can provide after wading through my novel.
Try keeping a bare repo on the usb stick and clone it to the machines you are working on.
Before you pack up for the day or complete to remove your stick, push your changes back to the "origin" (which is the bare repo on the stick).
When you open up on your other workstation (home?) fetch your changes.
Using the USB stick to keep the code and the repository on is one option - you get the advantages of portability and version control.
But, another way to do this is to keep a bare repo on the USB stick (or dropbox) and on each machine that you want to use the code, make a clone of this. When you finish doing what you are doing you can just push your changes upstream (to the USB stick or Dropbox or wherever).
Having a bare clone portable means that if you forget (or $DEITY forbid) lose the stick in it's travels, you won't be left holding your…without any code to work on. You can recreate a clone from any of the repositories if you've lost the key, and, if you forget the key at home or work or somewhere else, there is always something you can do on your project and merge the changes with the key when next they are together.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With