Create
cancel
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 helloworld.py.

 

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

 

testdata/ mike.txt

testlibrary/print.py

testcode/helloworld.py

 

git add testcode/helloworld.py

git commit -m " test"

git push origin  mybranch 

 

In bit bucket I am only expedted to see helloworld.py

 

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

testdata/ mike.txt

testlibrary/print.py

testcode/helloworld.py

 

 

 

 

1 answer

0 votes

Hi @michael lau  and welcome to the community.

The commands you executed:

git add testcode/helloworld.py

git commit -m " test"

git push origin mybranch

should push only testcode/helloworld.py to the Bitbucket repo.

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

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/helloworld.py'? 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,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
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