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

NEWS: Telegram supports Facetime video calls NOW!

Secure video calling is in high demand. As an alternative to Zoom, many people are using end-to-end encrypted apps such as WhatsApp, FaceTime or Signal to speak to friends and family face-to-face since coronavirus lockdowns started to take place across the world. There’s another option—secure communications app Telegram just added video calling to its feature set, available on both iOS and Android. The new feature is also super secure—like Signal and WhatsApp and unlike Zoom (yet), video calls will be end-to-end encrypted.

How to Buy Bitcoin?

Most people buy Bitcoin via exchanges, such as Coinbase. Exchanges allow you to buy, sell and hold cryptocurrency, and setting up an account is similar to opening a brokerage account—you’ll need to verify your identity and provide some kind of funding source, such as a bank account or debit card. Major exchanges include Coinbase, Kraken, and Gemini. You can also buy Bitcoin at a broker like Robinhood. Regardless of where you buy your Bitcoin, you’ll need a digital wallet in which to store it. This might be what’s called a hot wallet or a cold wallet. A hot wallet (also called an online wallet) is stored by an exchange or a provider in the cloud. Providers of online wallets include Exodus, Electrum and Mycelium. A cold wallet (or mobile wallet) is an offline device used to store Bitcoin and is not connected to the Internet. Some mobile wallet options include Trezor and Ledger.

Dev Tools from it


Telegram Dev Tools
FROM USA