To include another repository, that needn't be tracked in its super-repo, try this:
$ cd /path/to/master/
$ rm -rf book
$ git clone https://user@bitbucket.org/user/repo.git book
$ git add book
$ echo "book" >> .gitignore
Then commit.
As stated in the linked git submodule pitfalls article:
... the only linkage between the parent and the submodule is [the] recorded value of the submodule’s checked-out SHA which is stored in the parent’s commits.
That means that a submodule is not saved by its checked-out branch or tag, but always by a specific commit; that commit (SHA) is saved into the super-repo (the one containing the submodule) like a normal text file (it's marked as such a reference, of course).
When you check out a different commit in the submodule or make a new commit in it, the super-repo will see that its checked out SHA has changed. That's when you get the modified (new commits)
line from git status
.
To eliminate that, you can either:
git submodule update
, which will reset the submodule to the commit currently saved in the super-repo (for details see thegit submodule
manpage; orgit add book && git commit
to save the new SHA into the super-repo.
As mentioned in the comments, consider abandoning the book
submodule: clone it inside the super-repo, if tracking of its state as part of the super-repo is not necessary.