1

I took a read of a few similar questions but I have only used git for a few days and my project is moving swiftly so I need to implement the Git ASAP. Closest I saw was This Posting

I work on my code at work (On breaks OF COURSE!) which is a trailer in the middle of nowhere without internet (I'm gone 4 days a week) I then come home and push changes to GitHub and work with the other contributors.

I do not own a laptop so my home workstation stays where it is and I use the company machine with a Ubuntu LiveCD and my toolchain & code on the keystick.

How would I set this up so I have the least amount of fussing around? Currently on the ubuntu machine if I do "git status" I get the error: fatal: Not a git repository (or any parent up to mount parent /media) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

NOTE: I currently have the latest code in GitHub for one of my projects and another project I need to initialize a new git on but I am awaiting an answer first.

Community
  • 1
  • 1
uMinded
  • 555
  • 8
  • 19

1 Answers1

1

You can git init directly in your usb key, in order to have your git repo there, and clone that git repo on your laptop and on your company machine.

You can then:

  • simply copy your plroject in that local clone, add and commit, and then push back to 'origin' (which is your usb key), making your project always saved on that key.
  • add another remote called github and use it to push your code to GitHub when you have access to it.

You might want, as mentioned here, to set GIT_DISCOVERY_ACROSS_FILESYSTEM:

 sudo nano /etc/environment

add the following line:

 GIT_DISCOVERY_ACROSS_FILESYSTEM=1

http://www.totalannihilationclojurechallenge.com/2012/05/setting-gitdiscoveryacrossfilesystem.html

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I can not git clone to the local machine as its a LiveCD. I want the only local repo the exist on the keystick and only ever there. (Its USB3 so its plenty fast) I have a project with remotes for github set up but it keeps orphaning the local master and when i do "git push origin master" and check the github site 50% of the time the commit isn't listed. – uMinded Feb 20 '13 at 16:07
  • @uMinded no need to clone to clone, then, you can modify your project directly on the usb key. Don't forget to set the upstream branch when pushing to GitHub: http://stackoverflow.com/questions/6089294/git-why-do-i-need-to-do-set-upstream-all-the-time – VonC Feb 20 '13 at 16:22