Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
H How-To
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • docs
  • How-To
  • Wiki
  • initial config

Last edited by Анатолий Селютин Jan 22, 2018
Page history

initial config

Установка Git в Windows

  1. Установка менеджера пакетов Chocolatey В стандартной коммандной строке Windows, запущенной с правами администратора, выполнить:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  1. Установить Git-клиент, в PowerShell с правами администратора выполнить:
choco install -y git tortoisegit

Начальная настройка

  1. Имя, которое будет указано в коммитах:
git config --global user.name <Gitlab profile Username>
  1. E-mail, который будет указан в профиле коммита:
git config --global user.email <Gitlab profile Email>
  1. Автоматическая конвертация символов конца строк.
    Для пользователей Windows:
git config --global core.autocrlf true

Для пользователй Linux/Mac

git config --global core.autocrlf input
  1. Путь к глобальному gitignore-файлу, файл .gitignore_global можно скачать в этом же репозитории. Для пользователей Windows:
git config --global core.excludesfile %USERHOME%\\.gitignore_global

Для пользователй Linux/Mac

git config --global core.excludesfile %HOME%/.gitignore_global
  1. Добавляем короткие псевдонимы для часто встречающихся команд:
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.lg "log -3 --graph --color=auto"
git config --global alias.up "submodule update --init --remote"
git config --global alias.each "submodule foreach"
  1. Автоматический rebase вместо merge после pull
git config --global branch.autosetuprebase always
git config --global branch.master.rebase true
  1. Публикуем изменения только из текущей отслеживаемой ветки при вызове git push без аргументов
git config --global push.default tracking
  1. Активируем запись действий по разрешению конфликтных ситуаций при слиянии
git config --global rerere.enabled true
git config --global rerere.autoupdate true
Clone repository
  • Work in branches
  • clone ibank
  • create new module
  • create ssh key
  • git essentials
  • initial config
  • remove module
  • submodule basic