Работа с удалённым серверомПолучение и оправка репозиторияgit clone git://github.com/doctrine/doctrine2.git doctrine
Получает и сливает обновленную версию из удаленного репозитория с локальной веткой ~ git-pull ~git pull origin bootstrap3
Передает все сделанные вами изменения ~ git-push ~git push
Передает все сделанные вами изменения + меткиgit push origin master --tags
Просмотреть какие удалённые серверы уже настроены, параметр -v отображает так же url сервераgit remote -v
Добавить новый удалённый репозиторий под именем upstreamgit remote add upstream git@github.com:SimpleMachines/SMF2.1.git
Создать "мульти" репозиторий под именем allВ файле
.git/config добавить:
[remote "all"]
url=git@github.com:elkarte/Elkarte.git
url=git@github.com:interlab/Elkarte.git
Посмотреть список коммитов репозитория pb ветки master, которые были выполнены после последнего pull-аgit log pb/master
Переименовать удаленный репозиторий из pb на paulgit remote rename pb paul
Удалить удаленный репозиторий upstreamgit remote rm upstream
Как мне внести изменения в чужой проект?Извлечь (fetch) всю информацию, которая есть в репозитории upstreamgit fetch upstream
Слить (merge) информацию, которую получили через fetch с рабочим каталогомgit merge upstream/master
Отправить (push) код в ветку master удаленного репозитория origingit push origin master
How to update GitHub forked repository?~ link ~Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:
git fetch upstream
Make sure that you're on your master branch:
git checkout master
Rewrite your master branch so that any commits of yours that aren't already in upstream/master are replayed on top of that other branch:
git rebase upstream/master
If you've rebased your branch onto upstream/master you may need to force the push in order to push it to your own forked repository on GitHub. You'd do that with:
git push -f origin master