无论如何,我敢在
/
上启动了git仓库,因为它只是安装在8GB SD卡上的Beaglebone Black上的ARM Ubuntu,并且我们将ARM Ubuntu作为扇区到扇区SD卡映像获取,所以我们不能选择ZFS或BTRFS。 我可以在任何Linux机器上挂载SD卡并检出分支。
cd /
sudo git init
sudo vi .gitignore
/dev/
/lost+found/
/media/
/mnt/
/opt/
/proc/
/run/
/srv/
/sys/
/tmp/
/var/log/
sudo git add -A
sudo du -sh .git
297M .git
git config --global user.name 'Your Name'
git config --global user.email you@somedomain.com
sudo git commit -m "initial update and network configured"
sudo du -sh .git
308M .git
请提供我可以忽略的文件夹或文件。我会不断更新这个答案,列出忽略列表和我遇到的问题。
2013年7月18日21:59:00 IST
我的第一次检出让我有了糟糕的经历。当我尝试检出之前的提交时,它会抛出一些锁定失败的错误。犯了一个错误,没有记录输出。
然后我从BeagleBone上取下SD卡,并将其安装在我的Ubuntu桌面上。每个分区都给了2个挂载点
/media/rootfs/
和
/media/boot/
。我重新挂载了
/media/boot/
到
/media/rootfs/boot/uboot
,所以现在文件系统与在BeagleBone上启动的实时文件系统完全相同。
$ sudo cd /media/rootfs
$ sudo git log
commit 8bf5b7031bc1aee6392272da4eae2b808b46912f
Author: gowtham <gowtham@beaglebone>
Date: Thu Jul 18 12:04:05 2013 +0000
remotedevicecontroller with camcapture-compression option
commit 774765de36a0c3cc7280a29275c37928de982f6e
Author: gowtham <gowtham@beaglebone>
Date: Thu Jul 18 06:19:48 2013 +0000
before installing remotedevicecontroller with camcapture-compression
commit 19d5f3f66f29cbe925b8743c7248770d1f1d6ba4
Author: gowtham <gowtham@beaglebone>
Date: Wed Jul 17 13:34:33 2013 +0000
ffmpeg installed by remotedevicecontroller
commit 691c20afd7b166103dabc2561c72eb94c172e726
Author: gowtham <gowtham@beaglebone>
Date: Wed Jul 17 14:44:17 2013 +0000
initial update and network configured
$ sudo git stash
[sudo] password for gowtham:
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
You do not have the initial commit yet
但是.git/
存在于/media/rootfs/
中。请在下方评论指出我所犯的错误。