34

I'm a Bitbucket noob and having a hard time getting started.

I'm trying to clean up the Bitbucket repository and my local git folder master and branch organisation.

My local computer's git folder has some folders deleted via Terminal $ rm -r folderName > $ git push.

Bitbucket repository still shows the folderName. How do I remove this?

I already deleted file and commited , but files cached on bitbucket.

1
  • Looks like Adam Taylor's could be the accepted answer? Commented Apr 19, 2020 at 18:52

4 Answers 4

57

You need to remove the folder from your local repository with git rm -r folderName and then git commit -m 'Delete folder folderName because foo (for example) and git push.

Sign up to request clarification or add additional context in comments.

3 Comments

I already deleted these folders locally - in the file system. How can I login to Bitbucket and manually delete them? (this is a one time thing and it was done for reasons not worth going into here). thx.
@niico I don't know if you can manually delete them. Simply, if you delete the folder in your local repository, commit the change, then push your changes to the remote repository hosted on BitBucket, then the folder will be deleted from the remote repository hosed on BitBucket.
i am using android studio and i deleted build folder from local and commit the code to bitbuckt but still showing old build code why? plase share with me what wrong i did
1

You need to commit your changes before pushing them.

6 Comments

I already deleted file and commited , but files cached on bitbucket
Did you push the commit?
yes. git add, git commit -m "somthing", git push, but files/folders alredy cached on bitbucket
They are not "cached". Check that you are looking at the same branch you've pushed to.
I know, it's very old thread. But have you tried "git rm -r --cached ."
|
0

you forgot:

git commit -am "commit message"

Comments

0

You probably didn't do a final "git push" Once you delete your folder locally,

  1. git status
    this shows you that a folder was deleted
  2. git add .
    this stages changes
  3. git commit "deleted xyz folder"
  4. git push

this final "git push" deletes the folder on remote

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.