我在安装在sd卡上的ubuntu上运行beaglebone black。我正在学习通过安装各种软件包(就像欧洲核子研究组织( CERN )的人通过以不同的角度将它们碰撞在一起并研究它们的轨迹来研究亚原子粒子),以试错法对设备进行编程。那么我可以在根目录下初始化git存储库,而忽略/sys和/proc这样的易失性目录吗?或者观察哪些系统目录足以成功地跟踪整个操作系统的时间?有没有类似的快照工具?除了git之外,哪个存储库系统最适合对二进制文件进行时间跟踪?
-编辑--
/中的非易失性和重要(与/tmp不同)目录列表是什么
发布于 2013-07-17 02:03:13
无论如何,我敢在/上启动git repo,因为它只是一个安装在8 go sd卡上的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桌面上。它为每个分区/media/rootfs/和/media/boot/提供了2个挂载点。我在/media/rootfs/boot/uboot上重新挂载了/media/boot/,所以现在的文件系统与在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但是/media/rootfs/中存在.git/。在下面评论,我所犯的错误。
发布于 2020-05-07 10:20:20
在/文件夹中的另一种方法是白名单方法:
echo '*' > .gitignore #ignore everything in root
git add -f .gitignore
git add -f /folders_you_wish_to_include #using -f to add the folders you want to trackhttps://stackoverflow.com/questions/17672773
复制相似问题