о боже опять это, что я делаю не так я просто хочу чтобы он сохранял версии. почему он удаляет
прошу раберитесь в этом ...
тут весь лог того что я писал в консоль
spoilerPS E:\Projects-VSCode\test-js_nodejs> git status
HEAD detached from ada67ae
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: dataBase/launch.js
modified: dataBase/modules/responser.js
modified: dataBase/routers/routersControl.js
deleted: dataBase/src/public/pages/error.html
modified: dataBase/src/public/pages/home.html
(use "git add <file>..." to include in what will be committed)
dataBase/src/private/
dataBase/src/public/images/
dataBase/src/public/pages/error.txt
dataBase/src/public/pages/status.html
test.js
no changes added to commit (use "git add" and/or "git commit -a")
PS E:\Projects-VSCode\test-js_nodejs> git commit -m "change it cringe routersControl.js in dataBase -> routers"
[detached HEAD 53d05bd] change it cringe routersControl.js in dataBase -> routers
rename dataBase/src/{public/pages/error.html => private/floor-01/pages/home.html} (62%)
create mode 100644 dataBase/src/public/images/error.webp
create mode 100644 dataBase/src/public/images/favicon.ico
create mode 100644 dataBase/src/public/pages/error.txt
create mode 100644 dataBase/src/public/pages/status.html
create mode 100644 test.js
PS E:\Projects-VSCode\test-js_nodejs> git status
HEAD detached from ada67ae
nothing to commit, working tree clean
PS E:\Projects-VSCode\test-js_nodejs> git log
Date: Mon Jul 15 18:31:51 2024 +0300
change it cringe routersControl.js in dataBase -> routers
commit da38f4f562aa9d24668a7961f9583ddfd96b510f (releases, future)
Author: secret
Date: Fri Jul 12 01:09:58 2024 +0300
PS E:\Projects-VSCode\test-js_nodejs>
PS E:\Projects-VSCode\test-js_nodejs> git switch work
Warning: you are leaving 1 commit behind, not connected to
53d05bd change it cringe routersControl.js in dataBase -> routers
If you want to keep it by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 53d05bd
Switched to branch 'work'
PS E:\Projects-VSCode\test-js_nodejs> git log
Author: secret
Date: Tue Jul 9 20:46:56 2024 +0300
db work
commit 233a9e8821d6c60758ca1e8e20f16218607c7992
Author: secret
Date: Tue Jul 9 13:25:46 2024 +0300
PS E:\Projects-VSCode\test-js_nodejs> git swtich head
git: 'swtich' is not a git command. See 'git --help'.
The most similar command is
switch
PS E:\Projects-VSCode\test-js_nodejs> git log
Author: secret
commit 233a9e8821d6c60758ca1e8e20f16218607c7992
Author: secret
Date: Tue Jul 9 13:25:46 2024 +0300
PS E:\Projects-VSCode\test-js_nodejs> git checkout 4a
error: pathspec '4a' did not match any file(s) known to git
PS E:\Projects-VSCode\test-js_nodejs> git switch new
Already on 'new'
PS E:\Projects-VSCode\test-js_nodejs> git log
commit 2a2564d7b6c023b635031be89019361e897c40f8 (HEAD -> new, work)
Author: secret
Date: Tue Jul 9 20:46:56 2024 +0300
db work
commit 233a9e8821d6c60758ca1e8e20f16218607c7992
Author: secret
Date: Tue Jul 9 13:25:46 2024 +0300
future start not work version
commit 7240135df57f5217fcf945aaa3bb06201e8f2cb1
todo ... is so long
commit ada67ae150dfdb2cb43863d4aa0e0527a0ce3c7a (master)
Author: secret
Date: Sun Jul 7 22:52:34 2024 +0300
head
PS E:\Projects-VSCode\test-js_nodejs> git branch new2
PS E:\Projects-VSCode\test-js_nodejs> git log
commit 2a2564d7b6c023b635031be89019361e897c40f8 (HEAD -> new, work, new2)
Author: secret
Date: Tue Jul 9 20:46:56 2024 +0300
db work
commit 233a9e8821d6c60758ca1e8e20f16218607c7992
Author: secret
Date: Tue Jul 9 13:25:46 2024 +0300
я немного востановил с помощью vs code и в целом все важные файлы в норме вроде, но боже что я делаю не так я не понимаю. может мне проще удалить Git?
прошу обьяснить как нормально сохранять надо писать в начале git switch (перед работой)
и как востановить все, больше ничего трогать не буду.