Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.linux.misc > #77822
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
| Newsgroups | comp.os.linux.misc |
| Subject | Re: basic git operations |
| Date | 22 Nov 2025 20:34:09 GMT |
| Organization | Stefan Ram |
| Lines | 46 |
| Expires | 1 Jun 2026 11:59:58 GMT |
| Message-ID | <transcripts-20251122213102@ram.dialup.fu-berlin.de> (permalink) |
| References | <git-20251122190040@ram.dialup.fu-berlin.de> <wwvtsylx6hn.fsf@LkoBDZeT.terraraq.uk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de 3uoeZydl2nKo/C1P43ia7QYkh/CawlShcyDA6Qg+yRaXCE |
| Cancel-Lock | sha1:J5NWgnYN78tEFQvV4Eka6NLe2bo= sha256:d4R4kp8MfXVPOlx+KNdAtRy6l15DKFLkEOyMkeHyBtc= |
| X-Copyright | (C) Copyright 2025 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. |
| X-No-Archive | Yes |
| Archive | no |
| X-No-Archive-Readme | "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. |
| X-No-Html | yes |
| Content-Language | en |
| Xref | csiph.com comp.os.linux.misc:77822 |
Show key headers only | View raw
Richard Kettlewell <invalid@invalid.invalid> wrote or quoted:
>what you’re doing that you’ve left out. Post an exact transcript, i.e. a
>copy+paste of your session, and maybe someone will be able to tell what.
So, now I can post the transcripts. In fact, I have three batch files.
It is just for information, as my former problems have been solved.
I apologize for posting Windows batch files to a Linux newsgroup.
1. All three batch files start with:
set "GIT_EXE=..."
set "GIT_DIR=..."
set "GIT_WORK_TREE=..."
where "..." are three different file system paths omitted here.
2. The initialization:
mkdir "%GIT_DIR%"
cd "%GIT_DIR%"
"%GIT_EXE%" init
3. The backup:
cd /d "%GIT_DIR%"
"%GIT_EXE%" add .
for /f "tokens=1-6 delims=/:. " %%a in ("%date% %time%") do (
set "timestamp=%%a-%%b-%%c_%%d-%%e-%%f"
)
"%GIT_EXE%" commit -m "Backup on %timestamp%"
4. The listing
cd /d "%GIT_DIR%"
"%GIT_EXE%" -C "%GIT_DIR%" log --oneline
I have not yet tried to restore something, but I would use
"%GIT_EXE% checkout <commit-id>" for this.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 18:08 +0000
Re: basic git operations Richard Kettlewell <invalid@invalid.invalid> - 2025-11-22 18:33 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 18:46 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 20:34 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 21:13 +0000
Re: basic git operations Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-22 21:59 +0000
Re: basic git operations Richard Kettlewell <invalid@invalid.invalid> - 2025-11-22 23:11 +0000
Re: basic git operations pa@see.signature.invalid (Pierre Asselin) - 2025-11-22 19:52 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 20:10 +0000
Re: basic git operations Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-22 21:57 +0000
Re: basic git operations Beej Jorgensen <beej@beej.us> - 2025-11-24 20:23 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-24 20:38 +0000
Re: basic git operations Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-24 23:37 +0000
Re: basic git operations Beej Jorgensen <beej@beej.us> - 2025-11-25 22:06 +0000
Re: basic git operations Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-26 00:53 +0000
Re: basic git operations Pancho <Pancho.Jones@protonmail.com> - 2025-11-22 20:00 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 20:19 +0000
Re: basic git operations Pancho <Pancho.Jones@protonmail.com> - 2025-11-22 20:24 +0000
Re: basic git operations ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-22 20:37 +0000
Re: basic git operations Beej Jorgensen <beej@beej.us> - 2025-11-24 19:51 +0000
Re: basic git operations Richard Kettlewell <invalid@invalid.invalid> - 2025-11-24 22:27 +0000
Re: basic git operations Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-24 23:41 +0000
csiph-web