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 and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

Dev Tools from us


Telegram Dev Tools
FROM USA