I pushed some commits to branch A, and create a new branch B, pushed some other commits to B, why commits which were pushed to A also got pushed to B?
I tried to make changes directly on GitHub, but once I use VSCode to push, all previous commits got pushed again.
When you create your branch B, from your branch A, the commits you pushed before are already in the branch. If you wanted to create a separate branch without those commits, you must have checkout the commit before the branch A, and make a branch from this commit.