无法暂存要提交的文件

时间:2014-10-29 22:19:25

标签: git

我在本地机器和Bitbucket上有一个回购。我看不到作为第三方库的文件来自github我在Bitbucket上的存储库中作为源文件推送,但只是一个不可点击的文件夹图标。当我再次将repo克隆到另一个位置时,我不会获取这些文件夹中的文件,只会获取空文件夹。我写的代码文件没问题。

我将它们添加到git add的本地仓库中,但是我无法在get status中看到它们作为要提交的文件,但是因为未提交的更改未提交。 例如,我有

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$ 

我想念的git工作流程有什么意义?

1 个答案:

答案 0 :(得分:1)

您只是添加目录(没有文件)。

试试这个git add -A server/src/github.com/gorilla/mux/注意斜杠?这指定了目录的内容