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: References: 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 Richard Kettlewell 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 " for this.