Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/145.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git提交不提交新文件_Git_Github_Version Control_Bitbucket_Bitbucket Server - Fatal编程技术网

git提交不提交新文件

git提交不提交新文件,git,github,version-control,bitbucket,bitbucket-server,Git,Github,Version Control,Bitbucket,Bitbucket Server,我在使用bitbucket和codeanywhere时遇到问题。我试图将CakePHP安装到运行在ubuntu上的基于PHP的服务器上 我已将容器连接到git,并从最新提交中提取所有最新更改。然后我做了自己的更改,我做到了:git-commit--all,还用git-push推送了它 然而,我的问题是,我创建的文件夹(如“tmp”或“logs”)甚至我重命名的文件都没有提交到bitbucket上 我正在从主目录运行此命令 cabox@box-codeanywhere:~/workspace$

我在使用bitbucket和codeanywhere时遇到问题。我试图将CakePHP安装到运行在ubuntu上的基于PHP的服务器上

我已将容器连接到git,并从最新提交中提取所有最新更改。然后我做了自己的更改,我做到了:
git-commit--all
,还用
git-push
推送了它

然而,我的问题是,我创建的文件夹(如“tmp”或“logs”)甚至我重命名的文件都没有提交到bitbucket上

我正在从主目录运行此命令

cabox@box-codeanywhere:~/workspace$  
现在,即使文件不同,如果我再次尝试提交,也会显示以下内容:

nothing to commit, working directory clean

您可以在codeanywhere中初始化git repo,然后为bitbucket git repo添加远程,现在您可以执行pull/commit/push。具体步骤如下:

mkdir /path/for/the/bitbucket/repo
cd /path/for/the/bitbucket/repo
git init
git remote add origin <URL for bitbucket repo>
git pull
git commit
git push -u origin branchname
mkdir/path/for/the/bitbucket/repo
cd/path/for/the/bitbucket/repo
初始化
git远程添加源
吉特拉力
git提交
git push-u源分支名称
git commit——所有的
只会将更改提交给已经被跟踪的文件。git还不知道的文件(“未跟踪的”文件)被该命令忽略

如果确实要添加所有未跟踪的文件,最简单的方法是转到项目的根目录并使用:

git add .
git commit
这将添加任何未跟踪的文件,还将对已跟踪的文件进行阶段性修改。然后提交已转移的更改


如果要在实际提交之前仔细检查提交的内容,只需在
add
commit
之间执行
git status
。它将显示为下一次提交准备的所有路径。

3047非常模糊,不是吗?它似乎不起作用。我又试了一次,它只是说:“没什么要提交的,正在清理目录”@BigGreenAlligator你有一个.gitignore文件吗?