Adding a package to my repository

Hi :slight_smile: I’m totally new at GitHub so I could ask a stupid question… I had my first repository and committed a Java project with some classes, but I forgot to put them into a package. Later, in my local directory, I put my classes in a package, called the Git Bash in the directory that contains the package and then 

git add -A
git commit -m <message>
git push

But in that way I “lost” all my previous commits! I saw that now every file in the repository is marked with te <message> of the last commit. 

How should I have done?

Thank you

Hi @essay97,

This seems to be what would be expected behavior. However, I want to make sure I’m understanding correctly.

If you run git log, it should show you your previous commits. Is this what you’re looking for? If not, can you describe what you expected to happen versus what actually happened? Then we can go from there.

Cheers!