Bitbucket git delete files

i started using bitbucket + git + symfony2. And i got the problem. At the beginning i created new symfony2 project. Uploaded it to bitbucket server. But later, i delete local directory, created new symfony2 project with the same name and make some changes. Finally, my home version and bitbucket versions are different. But when i am trying to index and commit local files(git add . ; git status; git commit 'testing'), git tells that "no changes added to commit (use "git add" and/or "git commit -a")". I don't know what i am doing wrong. I think git mentioning another directory or something like this But, i have an idea: to empty bitbucket repo, and reupload local files(But i can't delete bitbucket current repo - only empty). So, i don't know how to do it

Upd:I am using ubuntu 13.10

Upvotes: 1

Views: 1901

Answers (1)

Waterlink
Waterlink

Reputation: 2369

Suggesting you to:

  • check if you have non-committed changes,
  • re-add bitbucket remote to your new local repository,
  • and push your code with --force.

Run this in terminal from folder

git init              # if repository is still not initialized
git remote add origin ssh://[email protected]/<username>/<repo>.git
git status
git add .             # if you had something
git commit -m "test"  # to commmit
git push -f origin master

Be careful with git push -f command. It may destroy commits on remote, but your case is the one to use it.

Upvotes: 2

Related Questions