Using git as a backend storage system

New to git here ...

I want to transfer my personal share to the git repository (text, documents, images, etc.).

Since I make changes to different files over time, telling git about them along the way how this happens, I can:

  • Get out of business with the usual add-ons / add-ons.
  • Be able to make a point file or complete clone recovery.

Basically, I want something grainy, so if I do the file editing 5 times on a certain day. I will have 5 versions of this file that I can go back to. Or even just get a complete copy of everything that it looked like on that particular day.

I am currently using rsync for remote incremental synchronization (without file versioning).

+3
source share
2 answers

To initialize the process, you can simply:

git init .
git add -A
git commit -m "initiali state of my documents"

in the directory where all your documents are located.

Then use one of Chris Jhonsen's suggestions to commit with each save.

As soon as you want to save the whole story and export it to another place, use . (and copy only one file around, anywhere) git bundle

Regarding the allocation from this large package of the exact repo status on a specific date, you should use the Revision section task git rev-parse

, @ , (, {yesterday}, {1 month 2 weeks 3 days 1 hour 1 second ago} {1979-02-26 18:30:00}), ref . < > ref, ref ($GIT_DIR/logs/<ref>).
, ref ; , , .
, , . --since --until.

+5

, , . , git .

git - . .

, , , , , .

, , git, , , , , .

+2

Source: https://habr.com/ru/post/1741544/


All Articles