Telegram Group & Telegram Channel
​​DeepGit: Экзамен

Мы разобрались с оновными основами основ в git:
Как выглядит директория git-a
Какие есть типы данных в git
Как git сохраняет версии и накатывает их
Что такое blob и как он хранит данные
Как собирается hash и архивируется текст

Давайте теперь глянем как это все собрать воедино:

- создадим репозиторий;
- добавим новый файл с текстом;
- коммит;
- добавим новый файл с другим текстом и изменения в первом файле;
- коммит.

C помощью привычного git-a выглядит следующим образом:

 git init
echo "text" >>1.txt
git add 1.txt
git commit -m "commit"
echo "text1" >> 1.txt
echo "text" >> 2.txt
git add .
git commit -m "commit 2"

Теперь как это можно сделать с помощью низкоуровневых команд git:

 git init
echo "text" >> 1.txt
git hash-object -w 1.txt
git update-index --add 1.txt
git write-tree
echo "commit" | git commit-tree <tree>
echo "text1" >> 1.txt
echo "text" >> 2.txt
git hash-object -w 1.txt
git hash-object -w 2.txt
git update-index --add 2.txt
git update-index 1.txt
git write-tree
echo "commit 2" | git commit-tree <tree> -p <pcommit>

Вот и все.
По большому счету, чтобы восстановить полностью проект достаточно иметь бекап его .git директории, в которой есть все версии и состояния проекта.

Завтра или послезавтра на @dev_quiz опубликую пару тестов по разобраному тут материалу с git-ом.
Следующее, что мы будем разбирать в git будут референсы и все, что с ними связано.

Напоминаю, если у вас остались вопросы или пожелания, можно их обсудить в нашем чате: @developer_tools_chat



tg-me.com/developer_tools/243
Create:
Last Update:

​​DeepGit: Экзамен

Мы разобрались с оновными основами основ в git:
Как выглядит директория git-a
Какие есть типы данных в git
Как git сохраняет версии и накатывает их
Что такое blob и как он хранит данные
Как собирается hash и архивируется текст

Давайте теперь глянем как это все собрать воедино:

- создадим репозиторий;
- добавим новый файл с текстом;
- коммит;
- добавим новый файл с другим текстом и изменения в первом файле;
- коммит.

C помощью привычного git-a выглядит следующим образом:

 git init
echo "text" >>1.txt
git add 1.txt
git commit -m "commit"
echo "text1" >> 1.txt
echo "text" >> 2.txt
git add .
git commit -m "commit 2"

Теперь как это можно сделать с помощью низкоуровневых команд git:

 git init
echo "text" >> 1.txt
git hash-object -w 1.txt
git update-index --add 1.txt
git write-tree
echo "commit" | git commit-tree <tree>
echo "text1" >> 1.txt
echo "text" >> 2.txt
git hash-object -w 1.txt
git hash-object -w 2.txt
git update-index --add 2.txt
git update-index 1.txt
git write-tree
echo "commit 2" | git commit-tree <tree> -p <pcommit>

Вот и все.
По большому счету, чтобы восстановить полностью проект достаточно иметь бекап его .git директории, в которой есть все версии и состояния проекта.

Завтра или послезавтра на @dev_quiz опубликую пару тестов по разобраному тут материалу с git-ом.
Следующее, что мы будем разбирать в git будут референсы и все, что с ними связано.

Напоминаю, если у вас остались вопросы или пожелания, можно их обсудить в нашем чате: @developer_tools_chat

BY Dev Tools


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/developer_tools/243

View MORE
Open in Telegram


Dev Tools Telegram | DID YOU KNOW?

Date: |

At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?

Telegram Auto-Delete Messages in Any Chat

Some messages aren’t supposed to last forever. There are some Telegram groups and conversations where it’s best if messages are automatically deleted in a day or a week. Here’s how to auto-delete messages in any Telegram chat. You can enable the auto-delete feature on a per-chat basis. It works for both one-on-one conversations and group chats. Previously, you needed to use the Secret Chat feature to automatically delete messages after a set time. At the time of writing, you can choose to automatically delete messages after a day or a week. Telegram starts the timer once they are sent, not after they are read. This won’t affect the messages that were sent before enabling the feature.

Dev Tools from us


Telegram Dev Tools
FROM USA