Updates for example .gitignore; clarification on comments

This commit is contained in:
DarkFeather 2022-05-06 13:12:06 -05:00
parent b710a683f2
commit 5aab2c1dbb
Signed by: DarkFeather
GPG Key ID: 1CC1E3F4ED06F296

View File

@ -1,7 +1,8 @@
The same concepts used for [AniNIX::Foundation](https://foundation.aninix.net/)'s revision control of code can be used for user home folders.
The same concepts used for [AniNIX/Foundation](https://foundation.aninix.net/)'s revision control of code can be used for user home folders.
# Setup
To create this tracking, use the following steps to create a read-write bare Git repo.
AniNIX/Foundation or other managed Git solutions will allow you to create [your upstream tracking](https://foundation.aninix.net/repo/create) natively in their UI. To create this tracking on a local machine without using these tools, use the following steps to create a read-write bare Git repo.
```
cd
mkdir .gitbare
@ -13,11 +14,8 @@ git clone .gitbare test && mv test/.git . && rmdir test
To pull these configs to any downstream system, do the following:
```
git clone $repo
cd $(ls -1tr | tail -n 1)
for item in $(ls -1a); do mv "$item" ..; done
cd ..
rmdir $OLDPWD
git clone $repo test
mv test/.git* . && git reset --hard origin/main && rm -Rf test
```
You will need to set up the file tracking below -- `git status` at this point will report lots of files that you probably won't want to track, like browser cache, temporary files, and large document files that are better backed up outside revision control.
@ -28,7 +26,7 @@ You will need the following .gitignore added to your repo. This will track SSH k
Other files are excluded for keeping the repo small enough to be cloned to a smartphone, but they can easily be added if so chosen.
```
# Ignore normal files
# Ignore normal files
*
!/.bash_profile
!/.bashrc
@ -37,17 +35,35 @@ Other files are excluded for keeping the repo small enough to be cloned to a sma
!/.githooks**
!/.gpg-id
!/.gnupg**
/.gnupg/.#*
/.gnupg/*.lock
!/password-store**
/password-store/*.password
/password-store/*.lock
!/.profile
!/.rclone.conf
!/.ssh**
!/.tmux.conf
!/.vimrc
!/.weechat**
!/src
/.password-store/kpdb.kdb.lock
/.weechat/weechat.log
!/.weechat
!/.weechat/**
/.weechat/logs
/.ssh/known_hosts
/.weechat/weechat.log
!/.wpa_supplicant**
!/.config/
/.config/*
!/.config/systemd**
/.config/systemd/user/default.target.wants**
/.config/systemd/user/timers.target.wants**
!/.config/xfce4/
!/.config/xfce4/xfconf/
!/.config/xfce4/xfconf/xfce-perchannel-xml**
!/ssh
!/src/
/src/*
!/src/local
.gnupg/random_seed
.weechat/script/plugins.xml.gz
```
# Value of Local Branches
@ -57,7 +73,7 @@ Some elements, like Git, use default identities for their operation. A local bra
There are some caveats to consider when using this policy.
## Cloud and Keys
Because this system captures SSH keys, PGP keys, and password databases, it is best [not stored in the cloud](/AniNIX/Wiki/src/branch/main/Policies/Design_Principles.md#user-content-physical-access). If you have to store it in the cloud, such as in Google Drive, GitHub, or AWS, you should look at [https://aninix.net/foundation/Aether AniNIX::Aether]'s source code for how to do strong encryption of a tarball of the repo, rather than committing directly to the cloud storage provider. This does, however, carry the intrinsic risk that flaws in the cryptography used can expose the keys to your identity! Don't use the cloud if you can avoid it.
Because this system captures SSH keys, PGP keys, and password databases, it is best [not stored in the cloud](/AniNIX/Wiki/src/branch/main/Policies/Design_Principles.md#user-content-physical-access). If you have to store it in the cloud, such as in Google Drive, GitHub, or AWS, you should look at [https://aninix.net/foundation/Aether AniNIX/Aether]'s source code for how to do strong encryption of a tarball of the repo, rather than committing directly to the cloud storage provider. This does, however, carry the intrinsic risk that flaws in the cryptography used can expose the keys to your identity! Don't use the cloud if you can avoid it.
## Large Files
Large files are difficult for revision control systems like this to handle -- they result in large differences for the revision control, which will lengthen clone times, branching, and such.