What is the difference between git push and git push origin

I'm having trouble differentiating between the two git statements, how exactly does one differ? Or do they differ at all?


git push will git push to the default remote

git push origin will push to the remote named origin

When you clone a repository, the default remote is origin and it is automatically as the default upstream. That's why you may not see the difference.

Although, if you init a repo locally, origin won't be automatically created, e.g.:

git init
git remote add origin ssh://url/to/origin
git push -u origin --all # note there is also other way to set up the upstream

Note that the default remote could be named anything. origin is only a convention.

Need Your Help

Stay on “CURLOPT_URL” for 60s


I'm using this code to test my Awstats with private proxies [4 ips]

SQL Data Sync portal doesn't see any tables or schemas

azure sql-azure azure-data-sync

I was trying out the new Data Sync from the new portal. But when I try to add the sync rules (which I think it's required to start syncing) doesn't load the schemas and tables.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.