* Novice questions about using git for personal data files
@ 2009-01-23 11:55 Alan E. Davis
2009-01-23 14:13 ` Manish
0 siblings, 1 reply; 2+ messages in thread
From: Alan E. Davis @ 2009-01-23 11:55 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 602 bytes --]
I followed the steps outlined in the worg tutorial about using git to keep
track of changes to one's own org data tree.
I still don't understand: how does one go about recovering an earlier
version of a file that has been corrupted? Is there a good tutorial on this
aspect of using git? I really like this idea, especially since I have
several times bodged an org-mode file by foolishly doing this:
C-x C-T *
and making other importune mistakes.
Thank you,
--
Alan
It is undesirable to believe a proposition when
there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
[-- Attachment #1.2: Type: text/html, Size: 712 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Novice questions about using git for personal data files
2009-01-23 11:55 Novice questions about using git for personal data files Alan E. Davis
@ 2009-01-23 14:13 ` Manish
0 siblings, 0 replies; 2+ messages in thread
From: Manish @ 2009-01-23 14:13 UTC (permalink / raw)
To: Alan E. Davis; +Cc: emacs-orgmode Mailinglist
On Fri, Jan 23, 2009 at 5:25 PM, Alan E. Davis wrote:
> I followed the steps outlined in the worg tutorial about using git to keep
> track of changes to one's own org data tree.
>
> I still don't understand: how does one go about recovering an earlier
> version of a file that has been corrupted? Is there a good tutorial on this
> aspect of using git?
I am not aware of any tutorial on this but may following should help.
1. Do a "git log" in the repo to see what commits you have made
2. Decide from which commit you want to revive the file (most likely
it would be the top most one.)
3. Note down the SHA1 for this commit (first eight or so characters
should suffice.)
4. Following should get you the file:
$ git checkout <SHA1> <file to checkout>
5. You may need to add and commit the file back again to your git
repo.
Frequent commits is a good idea but it's a burden so you might want to
create a small shell-script to commit periodically (hourly or so
maybe) for you.
Do let us know how it goes.
HTH
--
Manish
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-23 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 11:55 Novice questions about using git for personal data files Alan E. Davis
2009-01-23 14:13 ` Manish
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).