Groups | Search | Server Info | Login | Register


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

Re: basic git operations

From pa@see.signature.invalid (Pierre Asselin)
Newsgroups comp.os.linux.misc
Subject Re: basic git operations
Date 2025-11-22 19:52 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <10ft49n$ii0$1@reader2.panix.com> (permalink)
References <git-20251122190040@ram.dialup.fu-berlin.de>

Show all headers | View raw


Stefan Ram <ram@zedat.fu-berlin.de> wrote:

>   I copied my project files and directories to a directory D.

>   Then, in D (i.e., after "cd D"), I said,

> git init .
> git add .

>   and got "fatal: This operation must be run in a work tree".
>   What is a work tree?? (Don't answer this! By now I know.)

With a dot after "git init" ?

On Linux, "man git init" contains the following snippet:

======================================================================
    EXAMPLES
	   Start a new Git repository for an existing code base

		   $ cd /path/to/my/codebase
		   $ git init      (1)
		   $ git add .     (2)
		   $ git commit    (3)
		1. Create a /path/to/my/codebase/.git directory.
		2. Add all existing files to the index.
		3. Record the pristine state as the first commit in the
		   history.
======================================================================

A duckduckgo search on "git tutorial" returns tons of links, among them
    https://git-scm.com/docs/gittutorial

git is a beast, but for your own projects you can keep the workflow
simple. (I prefer mercurial myself... https://www.mercurial-scm.org/ )

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