🖥 Крутая шпаргалка по командам Git на русском
echo "# название" >> README.md - создание файла README.md
git init - инициализация репозитория
git add README.md - добавления файла README.md в проект
git commit -m "first commit" - получает проиндексированный снимок состояния и выполняет его коммит в историю проекта
git remote add origin https://github.com/stanruss/название.git - команда, которой устанавливается подключение к удаленному серверу и git репозиторию, размещающемуся на нем.
git push -u origin master - кзменения отправляются на удаленный сервер
git log --oneline - посмотреть все коммиты.
git checkout . - восстановить все.
git checkout "код коммита" - вернуть до состояния этого коммита.
git checkout master - вернуться в ветку мастер.
Восстановить файлы на локальном компьютере:
```shell
git fetch --all
git reset --hard origin/master или git reset --hard origin/<название_ветки>
```
git add text.txt - Добавить файл в репозиторий
git rm text.txt - Удалить файл
git status - Текущее состояние репозитория (изменения, неразрешенные конфликты и тп)
git commit -a -m "Commit description" - Сделать коммит
git push origin - Замерджить все ветки локального репозитория на удаленный репозиторий
git push origin master - Аналогично предыдущему, но делается пуш только ветки master
git push origin HEAD - Запушить текущую ветку, не вводя целиком ее название
git pull origin - Замерджить все ветки с удаленного репозитория
git pull origin master - Аналогично предыдущему, но накатывается только ветка master
git pull origin HEAD - Накатить текущую ветку, не вводя ее длинное имя
git fetch origin - Скачать все ветки с origin, но не мерджить их в локальный репозиторий
git fetch origin master - Аналогично предыдущему, но только для одной заданной ветки
git checkout -b some_branch origin/some_branch - Начать работать с веткой some_branch (уже существующей)
git branch some_branch - Создать новый бранч (ответвится от текущего)
git checkout some_branch - Переключиться на другую ветку (из тех, с которыми уже работаем)
git branch # звездочкой отмечена текущая ветвь - Получаем список веток, с которыми работаем
git branch -a # | grep something - Просмотреть все существующие ветви
git merge some_branch - Замерджить some_branch в текущую ветку
git branch -d some_branch - Удалить бранч (после мерджа)
git branch -D some_branch - Просто удалить бранч (тупиковая ветвь)
git show d8578edf8458ce06fbc5bb76a58c5ca4a58c5ca4 - Изменения, сделанные в заданном коммите
git push origin :branch-name - Удалить бранч из репозитория на сервере
git reset --hard d8578edf8458ce06fbc5bb76a58c5ca4a58c5ca4 - Откатиться к конкретному коммиту и удалить последующие (хэш смотрим в «git log»)
git push -f - Залить на сервер измененные коммиты
git clean -f - Удаление untracked files
#git#github#doc#cheatsheet
@DevOPSitsec
📰 MSI Claw Configuration Driver For Linux Coming Together With The Assistance Of AI
One of the latest Linux gaming handheld drivers being worked on is the MSI Claw Configuration Driver for controller configuration...
🔗 Source: https://www.phoronix.com/news/MSI-Claw-Configuration-Driver
#linux
📰Rust stalks IBM mainframes, but only in nightly form
Patch series would bring memory-safe code to Linux's s390 port, with compiler caveats attached.
🔗 Source: https://www.theregister.com/on-prem/2026/05/13/rust-stalks-ibm-mainframes-but-only-in-nightly-form/5239710
#linux
📰 Linux gains more critical Windows apps: 3D Movie Maker and Space Cadet Pinball
Further demonstrating its role as industry default OS the versatility of modern porting tools.
🔗 Source: https://www.theregister.com/oses/2026/05/13/linux-gains-more-critical-windows-apps-3d-movie-maker-and-space-cadet-pinball/5239455
#linux
📰Discord joke that it's The Year of the Linux Desktop
The Year of the Linux Desktop is finally here! Sort of. Well, not really but it's getting there and Discord has seen some nice improvements lately.Read the full article on GamingOnLinux.
🔗 Source: https://www.gamingonlinux.com/2026/05/discord-joke-that-its-the-year-of-the-linux-desktop/
#linux
📰 Fwupd 2.1.3 Linux Firmware Updater Adds Support for SHIFT6mq and SHIFTphone 8
Fwupd 2.1.3 Linux firmware updater is now available for download with support for the SHIFT6mq and SHIFTphone 8 modular smartphones, as well as various other improvements.
🔗 Source: https://9to5linux.com/fwupd-2-1-3-linux-firmware-updater-adds-support-for-shift6mq-and-shiftphone-8
#linux
📰 I tested every Linux desktop and realized fragmentation isn't a problem anymore
Choosing a Linux desktop used to be a make-or-break decision, but nowadays, things are much less complicated.
🔗 Source: https://www.xda-developers.com/tested-every-linux-desktop-realized-fragmentation-problem-anymore/
#linux
📰 F2FS Preparing FSERROR Reporting Support
Introduced in Linux 7.0 was FSERROR as generic I/O error reporting infrastructure. Linux to that point had no standardized mechanism for reporting metadata corruption or file I/O errors to user-space with each file-system doing its own thing. The Flash-Friendly File-System (F2FS) is now the latest Linux file-system preparing for FSERROR usage...
🔗 Source: https://www.phoronix.com/news/F2FS-FSERROR
#linux
📰 Linux 7.0.6 Released To Finish Mitigating the Dirty Frag Vulnerability
Linux 7.0.6 is out as stable this morning to finish mitigating the Dirty Frag vulnerability that was made public last week...
🔗 Source: https://www.phoronix.com/news/Linux-7.0.6-Released
#linux