diff --git a/.gitignore b/.gitignore index f528d9d..da8c2c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ cache/* +cache-full/* +cache-html/* output/* __pycache__ wiki/trash diff --git a/Makefile b/Makefile index 8abde7c..58054c6 100644 --- a/Makefile +++ b/Makefile @@ -4,3 +4,6 @@ build: pdf: pelican -s pelicanconf-full.py +clean: + rm -rf cache-html cache-full cache __pycache__ + diff --git a/pelicanconf-full.py b/pelicanconf-full.py index f2e27c3..b6ca9e5 100644 --- a/pelicanconf-full.py +++ b/pelicanconf-full.py @@ -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"] diff --git a/pelicanconf.py b/pelicanconf.py index 97e4c6c..a20fd2d 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -35,6 +35,7 @@ SITENAME = 'ДСП' SITEURL = 'https://dsp.246060.ru' PATH = 'wiki' +CACHE_PATH = 'cache-html' TIMEZONE = 'Europe/Moscow' diff --git a/wiki/Prog/Git/Git основные команды.md b/wiki/Prog/Git/Git основные команды.md new file mode 100644 index 0000000..b489ad5 --- /dev/null +++ b/wiki/Prog/Git/Git основные команды.md @@ -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 +``` +