The git commit command captures a snap of the project's presently staged changes. Committed snapshots are often thought of as “safe” versions of a project—Git can ne'er change them unless you explicitly ask it to. Prior to the execution of git commit, The git add command is employed to promote or 'stage' changes to the project which will be stored in a commit.
The git push command is employed to upload local repository content to a remote repository.
Pushing is how you transfer commits from your native repository to a remote repo.
It's the counterpart to git fetch, however, whereas fetching imports commits to native branches, pushing exports commits to remote branches.
Remote branches are designed using the git remote command.
Pushing has the potential to write changes, caution ought to be taken when pushing.