Skip to content

Instantly share code, notes, and snippets.

@klinkov
Last active September 11, 2019 21:22
Show Gist options
  • Save klinkov/23e203f7ec82279c5dc641b7fb171dd7 to your computer and use it in GitHub Desktop.
Save klinkov/23e203f7ec82279c5dc641b7fb171dd7 to your computer and use it in GitHub Desktop.
git clone - выкачать репозиторий
git pull – получение изменений из удаленного репозитория
git checkout - переключиться на ветку
git checkout –b - отведение новой ветки от текущей с переключением на нее
git add – добавление файлов в индекс
git commit –m ‘’ – коммит с комментарием
git push origin - пуш закоммиченных изменений в удаленный репозиторий origin
git branch –d - локальное удаление ветки
git stash save –keep-index + git stash drop – локальное удаление изменений в отслеживаемых файлах
git rm -r --cached node_modules && git commit -m 'Remove the now ignored directory node_modules' - удаление node_modules
git gc - удалить все неиспользуемые объекты
git remote prune origin - Удалить все ветки, которых нет во внешнем репозитории
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment