1

I am having an issue using bitbucket and codeanywhere. I was trying to install CakePHP onto the PHP based server running on ubuntu.

I have attached my container to the git and pulled all the latest changes from the latest commit. Then I made my own changes and I did:git commit --all and also pushed it with git push.

However my issue is that none of the folders that I created such as "tmp" or "logs" or even files I renamed got committed onto the bitbucket.

I am running this command from the main directory

cabox@box-codeanywhere:~/workspace$  

And now even with the files being different if I try to commit again it says the following:

nothing to commit, working directory clean
Big Green Alligator
  • 1,175
  • 3
  • 17
  • 33

2 Answers2

2

git commit --all will only commit changes to files that are already being tracked. Files git does not already know about ("untracked" files) are ignored by that command.

If you really want to add all untracked files, the simplest way is to go to the root of the project and use:

git add .
git commit

That will add any untracked files, and will also stage modifications to already-tracked files. And then commit the changes that have been staged.

If you want to double-check what was staged for commit before you actually commit, just git status in between add and commit. It will show you all the paths that are staged for the next commit.

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
0

You can initial a git repo in codeanywhere, and then add a remote for bitbucket git repo, now you can pull/commit/push. Detail steps as below:

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
Marina Liu
  • 36,876
  • 5
  • 61
  • 74