I have just started to use git today.
I have a repository in project_master/project
folder.
I made that with git init --bare
.
Then, I cd
to project_work
, and git clone ../project_master/project
I did some changes to the repository in project_work/project
. Type make test
. Didn't type make clean
. After that, I git add
everything, git commit
, and git push origin master
.
Now all the .o
, .a
files of the unit tests get into the repository in project_master/project
folder. How to delete those .o
, .a
files from the repository in project_master/project
folder?
Thank you.
Update:
I did the following:
~/project_work/project
cd unit_test
git rm *.o
git commit
git push origin master
Then,
cd ~/project_test
rm -rf project
rm -rf .git
ls -a
git clone ../project_master/project
cd project/unit_test
And the .o
files are still there.
I also did as in this SO question: Completely remove files from Git repo and remote on GitHub. But didn't work. After that, I try git rm
again and that didn't work.