Skip to content

Instantly share code, notes, and snippets.

@drnextgis
Created February 19, 2012 10:27
Show Gist options
  • Save drnextgis/1863000 to your computer and use it in GitHub Desktop.
Save drnextgis/1863000 to your computer and use it in GitHub Desktop.
Команды для работы с github-репозиториями
Создание локального репозитория
$git clone [email protected]:drnextgis/openlayers.git
$cd openlayers
$git remote add upstream git://github.com/openlayers/openlayers.git
Обновление локального репозитория
$git pull upstream master
Создаем ветку
git checkout -b feature #Создаёт новую ветвь, названную "feature" и делает её активной
Коммиты
$git commit -a -m "message"
Обновление удаленного репозитория
$git push origin feature #Загружает изменения в текущей ветви в origin в ветвь feature
Справочные комманды
$git show
$git log
$git diff
Так же можно удалить ветку, в которой велась разработка:
git branch -d feature #В локальном репозитории
git push origin :feature #В удалённом репозитории
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment