Reputation: 3070
I have a repo on my local machine and on Bitbucket. I cannot see the files that are third party libraries from github I have pushed up there in my repository on Bitbucket as source files, but only a non-clickable folder icon. And when I clone the repo again to a different location I don't get the files in those folders but only the empty folders. No problem with the code files I have written.
I add them on my local repo with git add
but I cannot see them in get status
as files to be committed but as changes not staged for commit.
For example I have
Macqueena:otp faruk$ git add --all server/src/github.com/gorilla/mux
Macqueena:otp faruk$ git status
# On branch gradesinner
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: scripts.sh
# deleted: server/pkg/darwin_amd64/github.com/gorilla/pat.a
# deleted: server/pkg/darwin_amd64/github.com/gorilla/schema.a
# deleted: server/pkg/darwin_amd64/github.com/gorilla/websocket.a
# deleted: server/pkg/darwin_amd64/github.com/jmoiron/sqlx.a
# deleted: server/pkg/darwin_amd64/github.com/jmoiron/sqlx/reflectx.a
# deleted: server/pkg/darwin_amd64/github.com/justinas/nosurf.a
# new file: server/src/github.com/user/createdbandtables/createdb.sql
# renamed: server/src/github.com/user/createdbandtables/createdbandtables.sql -> server/src/github.com/user/createdbandtables/createtables.sql
# new file: server/src/github.com/user/createsampledata/createsampledata.sql
# modified: server/src/github.com/user/main/otp.go
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: server/src/github.com/gorilla/mux (modified content)
#
Macqueena:otp faruk$
What is the point in my git workflow I miss?
Upvotes: 0
Views: 104
Reputation: 346
You are adding the directory only (none of the files).
Try this git add -A server/src/github.com/gorilla/mux/
Note the trailing slash? That specifies the contents of the directory.
Upvotes: 1