Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.linux.misc > #77817
| From | Pancho <Pancho.Jones@protonmail.com> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: basic git operations |
| Date | 2025-11-22 20:00 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <10ft4oi$pbhe$1@dont-email.me> (permalink) |
| References | <git-20251122190040@ram.dialup.fu-berlin.de> |
On 11/22/25 18:08, Stefan Ram wrote: > I hope this is the correct newsgroup! > > I taught relativity courses in adult education centers, > but I do not get "git". Even the most basic uses are a > total mystery to me. > > Before, I edit a project folder, I just make a zipped > backup of the whole folder. This is my version control. > From time to time, I delete some older zip files, then. > > Today, I decided to give git another try, and it was, > again, not easy. I decided, for now, to just use it as > a delta optimized backup solution for versions. As a start. > > But it seams, even the dear chatbot does not know the most > basic parts. > > 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.) > > Only after a long dialog, we figured out, git has to be told > where that work tree is supposed to be for you, so: > > git init . > set "GIT_WORK_TREE=D" > git add . > . . . > > (or use "git --work-tree=D"). This, then, worked. > > So how come even the chatbot can't get something simple as this > right the first time? Maybe I'm using the wrong approach? > > I'm using git on Windows, by the way, and have no other > variables set starting with "GIT_" in my environment. > > I just need these four operations: > > - Do whatever is needed once to setup the repo. > - Add all my files to the repo as a new "version". > - List all versions added so far. > - Extract one of the listed versions from the repo. > > And to do this I now use (always after "cd D"): > > - git init > - set "GIT_WORK_TREE=D"; git add .; git commit -m "..." > - git log --oneline > - git checkout ... > > . As I know that my git brain is very small, I try to make things > as simple as possible for myself. As soon as terms like "staging > area" are mentioned, my tiny git brain totally shuts down. > > what happens when you type: git config -l Maybe you installed it a while ago and set up a non standard core.worktree? Not something I ever do, but I vaguely remember that you can.
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