I have two concise questions:
Track all of your files with git add
. Commit all of the changes you want to commit and push to remote. Then stash your new file with git stash
. Your file will be tracked but not committed.
So in your example you would start by un-staging fileA. Then run git add README.md
and git add composer.lock
. git commit -m "Committing fun stuff."
. Now we need to track the new file without staging it so we simply do git add fileA
followed by git stash
. When you're ready to commit fileA you can run git stash pop
to commit/push to remote.