Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete .class Files From Remote Repository

Isaiah Discipulo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2018

I accidentally added the .class files of a Java project to the master repo and would like to delete them. Stack Overflow suggested the `git rm` command, however the files are still showing in the BitBucket source page. Since the files are .class I cannot access the "edit" option to delete them, as other threads on this site suggest. What should I do?

1 answer

0 votes
Chiranjib Patra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2025

Open workspace location of the file, manually delete them then check git status.

XX:\Workspace>git status
Your branch is up to date with 'origin/feature/xxx'.

Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: Filename1.class
deleted: Filename2.class

Then, git commit -m "deleted class file"

deleted class file
2 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 Filename1.class
delete mode 100644 Filename2.class

Then git push

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events