Итак, я начал использовать Git несколько дней назад. ( Очень поздно на вечеринку - не ругайте :) ). По-настоящему начинаю знакомиться с основными командами, идеями и рабочими процессами. Тем не менее, субмодули действительно заставляют мой мозг развлечься. Я пытаюсь добавить код для FuelPHP GitHub , и я мог бы использовать некоторые рекомендации и советы.
Я запускаю в терминале следующие команды:
//1: clone the repository from Fuel's github.
git clone git://github.com/fuel/fuel.git
//2: move into the main fuel directory
cd fuel
//3: initilize the submodules (populate .git/config with submodule data)
git submodule init
//4: download the submodules...
git submodule update
//5: move into the core directory (which is a submodule).
cd fuel/core
//6: change branch from (*no branch) to 1.1/develop
git checkout 1.1/develop
//7: open random file in text editor + make some small change (i.e. typo) + save file.
sudo gedit classes/autoloader.php
//8: add this file to the staging area.
git add classes/autoloader.php
//9: commit this file under 1.1develop branch.
git commit -m "im committing a submodule"
//10: push the new commit to MY (not fuel's) github repo (yes i've renamed the repo).
git push git@github.com:jordanarseno/fuel-core.git
//11: changes are reflected on github, looks good.
//12: back way out to fuel again. time to push the submodule commit separately.
cd ../../
//13: add the fuel/core submodule to the staging area.
git add fuel/core
//14: commit the submodule change.
git commit -m "submodule pushed. pushing super now."
//15: push the commit to MY (not fuel's) github repo.
git push git@github.com:jordanarseno/fuel.git
В частности, мои вопросы:
1.1 / develop
в подмодуле, но по умолчанию устанавливает мне * без ветки
? Могу ли я изменить это поведение? 1.1 / master
, 1.0 / develop
и т. Д.). cat.git / config
в супер-шоу: Вместе со всеми подмодулями ...
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/fuel/fuel.git`
Запуск cat .git config
в основном подмодуле показывает:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/fuel/core.git
Было бы разумно изменить эти URL-адреса моего собственного репо на GitHub? Топливо все равно отрицает толчки. Если я выполню обновление подмодуля, они будут перезаписаны?
Я также задавал этот вопрос на Форумах Fuel , но это скорее общий вопрос, и здесь есть другие Gitters ... СПАСИБО!