Warning: Undefined array key 1 in /var/www/u2622629/data/www/alekstore.info/wp-content/plugins/visitors-online/visitors-online.php on line 505

Warning: Undefined array key 2 in /var/www/u2622629/data/www/alekstore.info/wp-content/plugins/visitors-online/visitors-online.php on line 505

Warning: Cannot modify header information - headers already sent by (output started at /var/www/u2622629/data/www/alekstore.info/wp-content/plugins/visitors-online/visitors-online.php:505) in /var/www/u2622629/data/www/alekstore.info/wp-content/plugins/visitors-online/visitors-online.php on line 557
Git команды (шпаргалка) — strelchenko blog Яндекс.Метрика

Git команды (шпаргалка)

  1. git status

  2. git commit -m “Comment fot Commit” Добавление коммита

  3. git push Отправка на гит

  4. git fetch Извлечение данных в гит папку

  5. git pull Для появления изменений в проекте

  6. git commit -a -m “Comment fot Commit” Добавление в индекса с коммитом

Подключение к удаленному гиту: 7. git remote -v Показать адресс репозитория

  1. git remote add BASE01 URL

8б. git remote add origin git@github.com:alekstore/BASE01.git

8в. git config —global user.email “xyzold001@gmail.com”

8г. git config —global user.name “alekstore”

8д. git clone https://github.com/alekstore/BASE01.git — создает папку с таким именем, а дальше по схеме:

git add . git status git commit -m “subscribe” git push 8е. Можно создать репозиторий в VS Config и из версий гита отправить на ginhub.com,

а дальше по схеме:

git add . git status git commit -m “subscribe” git push 9. git log Выкатывает список

  1. git show 93845827984579457943257 Прсмотр по индексу коммита

  2. git branch Просмотр всех веток

  3. git branch -v Просмотр всех веток

  4. git checkout -b test создание и переход на новую test

  5. git branch test Создание ветки test

  6. git checkout test Переход на ветку test

  7. git branch -d test Yдаление ветки test

  8. git push origin :test Yдаление ветки test на удаленном сервере

  9. git checkout -D test Yдаление ветки test

  10. git merge test Слияние с веткой test

  11. git checkout 6441b05a802163b77c9d6f39f4fed7c44d925893 t2.txt Откат файла к коммиту

Еще git команды:

Gitflow как инструмент

Git add git commit

Прокрутить вверх