Got a new Mac and decided to get ansible from github vs copying it from my 
old Mac.

$ git --version
git version 2.8.2

$ git clone https://github.com/ansible/ansible.git
<snip>

$ git submodule update --init --recursive
<snip>

$ cd ansible/lib/ansible/modules/core
$ git remote -v
origin https://github.com/ansible/ansible-modules-core (fetch)
origin https://github.com/ansible/ansible-modules-core (push)

$ git status
HEAD detached from 9db1233
nothing to commit, working directory clean

Why is HEAD detached?

$ cd ../extras/
$ git remote -v
origin https://github.com/ansible/ansible-modules-extras (fetch)
origin https://github.com/ansible/ansible-modules-extras (push)

$ git status
HEAD detached at 675d778
nothing to commit, working directory clean

Same problem with extras, HEAD is detached?

I thought the "git submodule update --init --recursive" would keep core and 
extra updated?

in ansible/modules/extras

$ git pull origin devel
>From https://github.com/ansible/ansible-modules-extras
 * branch            devel      -> FETCH_HEAD
Updating 675d778..77eee2b
Fast-forward
 .travis.yml                          |   2 +-
 cloud/amazon/GUIDELINES.md           |   5 +
 cloud/cloudstack/cs_template.py      |  17 ++
 cloud/vmware/vmware_datacenter.py    |   2 +
 messaging/rabbitmq_user.py           |   2 +-
 monitoring/monit.py                  |   5 +-
 network/f5/bigip_monitor_http.py     |  15 +-
 network/f5/bigip_monitor_tcp.py      |  17 +-
 network/f5/bigip_node.py             |  17 +-
 network/f5/bigip_pool.py             |  15 +-
 network/f5/bigip_pool_member.py      |  18 +-
 network/f5/bigip_virtual_server.py   |  16 +-
 notification/hipchat.py              |   5 +-
 packaging/language/maven_artifact.py |   8 +-
 packaging/os/homebrew_cask.py        |  42 +++-
 packaging/os/zypper.py               | 425 
+++++++++++++++++++----------------
 16 files changed, 396 insertions(+), 215 deletions(-)

I've used How can I reconcile detached HEAD with master/origin? 
<http://bit.ly/1WaI83Y> to fix up the "HEAD detached"  but why does clean 
clone from github put things into "HEAD detached" state?

Why doesn't the "git submodule update --init --recursive" keep the modules 
up today? 

I'm guessing the "HEAD detached" might be the reason "git submodule update 
--init --recursive" doesn't keep the modules up today.

For many months I thought I've been keeping my local repository tracking 
github with this series of commands:

$ git pull --rebase
$ git submodule update --recursive --init

Is that still the best way to track devel branch on github?

I'll admit I'm a git newbie so any help would be appreciated. 

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to