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: |

The global forecast for the Asian markets is murky following recent volatility, with crude oil prices providing support in what has been an otherwise tough month. The European markets were down and the U.S. bourses were mixed and flat and the Asian markets figure to split the difference.The TSE finished modestly lower on Friday following losses from the financial shares and property stocks.For the day, the index sank 15.09 points or 0.49 percent to finish at 3,061.35 after trading between 3,057.84 and 3,089.78. Volume was 1.39 billion shares worth 1.30 billion Singapore dollars. There were 285 decliners and 184 gainers.

Telegram today rolling out an update which brings with it several new features.The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations.

Dev Tools from ms


Telegram Dev Tools
FROM USA