Published March 07, 2018 by

Git - Push Code


After committing to new files and changes of code we can push all code into the remote repository using git push command.

Syntax

git push remote_repository remote_branch

Example

After committing to new files and changes of code we can push all code into the remote repository using git push command. Please note By default the remote repository is origin and default branch is master.

git push origin master

OR

git push myfirstrepo subhash 

This command will require username and password to your git account.

git push myfirstrepo subhash

Username for 'remote_server_location': Subhash
Password for '[Subhash]@server': wxyzabc
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 6.03 KiB | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To remote_server_location
   cd5dd84..3d31ae3  master -> master


Previous: Commit Files and log                                                Next: Branching