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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.