GIT. Выкладываем репозиторий на GitHub
09 May 2017
local_offer
other
local_offer
coding
Создадим репозиторий и закомитиим первую версию:
git init
git add .
git commit -m "Init"
Добавим локальному репозиторию данные о пользователе и email:
git config user.email "pslater.ru@gmail.com"
git config user.name "plsatin"
Публикуем на GitHub:
git remote add origin https://github.com/plsatin/project.git
git push -u origin master
Пример файла .git/config:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = https://plsatin:password@github.com/plsatin/project.git
fetch = +refs/heads/*:refs/remotes/origin/*
[user]
name = plsatin
email = pslater.ru@gmail.com
[credential]
helper = store
[branch "master"]
remote = origin
merge = refs/heads/master
Пример файла .gitignore (обычно мои репозитории лежат на локальном mercurial, по этому игнорируем его в git):
.hg/
^.hgignore
Клонируем существующий репозиторий:
git clone https://github.com/plsatin/project.git