Merge branch 'master' of git.246060.ru:/f1x1t/dsp-site

This commit is contained in:
Andrei Astafev 2019-05-25 21:45:05 +03:00
commit b1f569977e
5 changed files with 108 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
cache/*
cache-full/*
cache-html/*
output/*
__pycache__
wiki/trash

View File

@ -4,3 +4,6 @@ build:
pdf:
pelican -s pelicanconf-full.py
clean:
rm -rf cache-html cache-full cache __pycache__

View File

@ -35,6 +35,7 @@ SITENAME = 'ДСП'
SITEURL = 'https://dsp.246060.ru'
PATH = 'wiki'
CACHE_PATH = 'cache-full'
TIMEZONE = 'Europe/Moscow'
@ -84,7 +85,7 @@ I18N_GETTEXT_DOMAIN = 'messages'
JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']}
PLUGIN_PATHS = ["plugins/official", "plugins/thirdparty"]
PLUGINS = [i18n(), "pandoc_reader", "pelican-css", "pelidoc", "series", "subcategory", "tag_cloud", "tipue_search", "plantuml"]
PLUGINS = [i18n(), "pandoc_reader", "pelican-css", "pelidoc", "series", "subcategory", "tag_cloud", "tipue_search", "plantuml", "replacer"]
#PLUGINS = ["better_tables", "just_table"]
PDF_PROCESSOR = True
@ -117,6 +118,11 @@ PANDOC_MARKDOWN_EXTENSIONS = [
PANDOC_EXTENSIONS = PANDOC_MARKDOWN_EXTENSIONS
REPLACES = (
(u'output/images/', u'images/'),
)
YUICOMPRESSOR_EXECUTABLE = "yui-compressor"
YUICOMPRESSOR_EXTRA_OPTIONS = ["--nomunge"]
PLUGINS += ["yuicompressor-opt"]

View File

@ -35,6 +35,7 @@ SITENAME = 'ДСП'
SITEURL = 'https://dsp.246060.ru'
PATH = 'wiki'
CACHE_PATH = 'cache-html'
TIMEZONE = 'Europe/Moscow'

View File

@ -0,0 +1,95 @@
---
title: "Git: основные команды"
category: Программирование
tags: программирование, git
summary:
monofontoptions:
- Scale=0.8
...
Установка git:
```sh
sudo apt-get install git
```
Инициализация репозитория в каталоге `dir`:
```sh
git init dir
```
Клонирование репозитория `repo`, принадлежащего пользователю `user`,
с сервера `gitlab.2` в каталог `dir`:
```sh
git clone git@gitlab.2:user/repo.git dir
```
Файлы в рабочем каталоге могут отслеживаться системой контроля версий
(tracked) или нет (untracked). Отслеживаемые файлы, которые на диаграмме
обозначены зелёным фоном, могут быть неизменёнными (unmodified),
изменёнными (modified) или подготовленными к фиксации (staged).
```plantuml
@startuml
participant untracked as "Неотслеживамые\n(untracked)"
participant unmodified as "Неизменённые\n(unmodified)" #99FF99
participant modified as "Изменённые\n(modified)" #77FF77
participant staged as "Подготовленные к фиксации\n(staged)" #55FF55
untracked -> staged : git add
unmodified -> modified : редактирование
modified -> staged : git add
staged -> unmodified : git commit
modified -> untracked: git rm --cached
unmodified -> untracked: git rm --cached
staged -> untracked: git rm --cached
@enduml
```
Просмотр состояния рабочего каталога и репозитория:
```sh
git status
```
Краткая форма вывода состояния:
```sh
git status -s
```
Добавление файла `README.md` под версионный контроль и подготовка
к фиксации:
```sh
git add README.md
```
Удаление файла `README.md` из индекса репозитория:
```sh
git rm --cached README.md
```
Зафиксировать файлы, подготовленные к фиксации:
```sh
git commit
```
Зафиксировать все отслеживаемые файлы, которые были изменены:
```sh
git commit -a
```
Отправить все ветки репозитория на сервер с меткой `origin`:
```sh
git push origin
```