Missed Team ’24? Catch up on announcements here.

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

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

michael lau
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!
December 16, 2020

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2020

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
AUG Leaders

Atlassian Community Events