Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.misc > #77822

Re: basic git operations

From ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups comp.os.linux.misc
Subject Re: basic git operations
Date 2025-11-22 20:34 +0000
Organization Stefan Ram
Message-ID <transcripts-20251122213102@ram.dialup.fu-berlin.de> (permalink)
References <git-20251122190040@ram.dialup.fu-berlin.de> <wwvtsylx6hn.fsf@LkoBDZeT.terraraq.uk>

Show all headers | 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 | NextPrevious in thread | Next in thread | Find similar


Thread

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