Git On A Keystick& GitHub上 [英] Git On A Keystick & GitHub

查看:135
本文介绍了Git On A Keystick& GitHub上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了几个类似的问题,但我只用了几天的git,并且我的项目正在迅速移动,因此我需要尽快实施Git。最近我看到了这篇文章



我在工作中处理自己的代码(在课程休息时间!),这是一个没有互联网的地方(我每周4天都去过)的预告片,然后我回到家并推送更改为GitHub并与其他贡献者一起工作。



我没有笔记本电脑,所以我的家庭工作站保持在原来的位置,我使用带有Ubuntu LiveCD的公司机器,我的工具链&密码棒上的代码。



我怎么设置这个,所以我有最少的烦恼?目前在ubuntu机器上,如果我做的git status,我得到的错误:
致命:不是git存储库(或任何父母挂载父母/媒体)
停止在文件系统边界(未设置GIT_DISCOVERY_ACROSS_FILESYSTEM)。



注意:我目前有最新代码在GitHub中为我的项目之一,另一个项目,我需要初始化一个新的Git,但我首先等待一个答案。

解决方案

<您可以直接在您的USB密钥中 git init ,以便让您的git回购,并在您的笔记本电脑和公司机器上克隆该git回购。



您可以:


  • 简单地将您的plroject复制到本地克隆中,添加并提交,然后推回到'origin'(这是您的USB密钥),使您的项目始终保存在该密钥上。

  • 添加另一个名为 github ,并在您有权访问时使用它将您的代码推送到GitHub。您可能需要


此处提及,设置 GIT_DISCOVERY_ACROSS_FILESYSTEM

  sudo nano / etc / environment 




添加以下行:



  GIT_DISCOVERY_ACROSS_FILESYSTEM = 1 

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


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.

解决方案

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

这篇关于Git On A Keystick&amp; GitHub上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆