This assumes you are already cloned a repository from the source Git repo (typically called "origin") to a directory on your PC, such as the foo.git or bar.git repos.
After cloning a repository, by default, you will have a branch called "master" on your PC.
It's always a good idea to first using the git pull command to ensure your local repoistory contains the latest commits.
And then used the git checkout command to use the branch that contains a file you want to edit (master in this example).
git checkout master
And then modified a file named foo.txt in the master branch of the repository, and committed the change you made to foo.txt, using the git commit command.
git commit foo.txt
The git push command can now be used to all of the commits in one of your branches to the origin Git repository.
In this example, all of the commits in your master branch will be pushed to the origin Git repository.
git push origin master
Or, if foo.txt was in some other branch, such as a branch named feat/logging, you would push your local feat/logging branch to the origin Git repository.
git push origin feat/logging
Something like this should be returned.
Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 431 bytes | 0 bytes/s, done. Total 4 (delta 3), reused 0 (delta 0) To ssh://firstname.lastname@example.org:7999/path/to/foo.git 511bd98..4f92bf5 master -> master
The -q or --quiet option can be used to suppress all output.
git push --quiet origin master