git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Rules for backup discussion

From
IDIgor Djordjevic <igor.d.djordjevic@gmail.com>
Date
Oct 28, 2017, 14:27 UTC
Message-ID
<3028f1a1-1311-b9e2-562f-08817a9daa94@gmail.com>
In-Reply-To
<C29FBE3637EA47B9AEDD7895339AB8C8@blackfat>
Hi Jason,
On 28/10/2017 14:49, Jason Pyeron wrote:
Show 9 quoted lines
> I would like to efficiently backup my project directories.
> 
> I am thinking that the backup of a git enabled project should only backup the following sets of files:
> 
> Files under .git/
> The results of git clean -ndx
> The results of git status
> 
> Does this make sense? Is there a less expensive way to calculate the backup file set? I ask because sometime git status takes a long time.

What do you consider being an "efficient backup", which files are you actually interested in making the backup of...?

Do you use submodules? If not, and if your backup thoughts show the idea of files you want to keep (committed + untracked + ignored + modified, basically all of them), I think the easiest approach is to just backup the whole project folder - that way you keep committed history (".git" subfolder/repository) plus all additional uncommitted work as well (untracked/ignored/modified files inside the working tree), and no extra calculations are needed.

In case you don`t care about uncommitted stuff, you can just backup ".git" subfolder (the repository), it keeps project`s whole history, with all versions of all the files in it (thus latest included).

Regards, Buga

Previous: Jason Pyeron
Message 2 of 2 in “Rules for backup discussion”
  1. Jason PyeronOct 28, 2017
  2. Igor DjordjevicOct 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.