Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

When I push one file, how come a lot of files get pushed also ?

We created a folder with test data and test libraries , and test code.


In the test code folder, I created a file called


When I only wan to check in   test folder library and test data gets pushed also


testdata/ mike.txt




git add testcode/

git commit -m " test"

git push origin  mybranch 


In bit bucket I am only expedted to see


but I see all this in bit bucket..   Can you help me ?

testdata/ mike.txt







1 answer

0 votes

Hi @michael lau  and welcome to the community.

The commands you executed:

git add testcode/

git commit -m " test"

git push origin mybranch

should push only testcode/ to the Bitbucket repo.

Are the files testdata/mike.txt and testlibrary/ part of the same commit that added testcode/, or not? You can check that if you open from Bitbucket website the specific commit that added the file testcode/

If the other 2 files are part of the same commit, they may have been added before. Did you perhaps execute 'git add .' before 'git add testcode/'? As that would add all unstaged files.

The other explanation for the files being in the repo is that they were pushed in a different commit, possibly by another user.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,719 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you