Pushing changes to an empty git repository for the first time

git push --set-upstream origin master
After cloning an empty repository on the client ("git clone" just after "git init", for instance), "git push" fails. In order to be able to push to this repository for the first time, you need to run the above command. It will link your local "master" branch to the "master" branch in the origin server, and push the changes. This is only necessary only for the first push; after that, you can use just the commands "git push" or "git pull" in order to do this operations.
Sample Output
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 1.34 KiB | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To [email protected]:/srv/git/my-project.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

2017-01-09 00:32:14

What Others Think

I love this command and I am gonna use it. And yes I will do it with the same 14 characters. You can get casino free spin codes to get casino games at low price. Thanks for sharing this with us.
Lere1953 · 55 weeks ago
Great info! Thank you for the recommendations! But as wel you can try ALDC - aussie casinos reviews
Vally · 48 weeks and 6 days ago
In fact, I do not even know, but I think most likely not. But it is better not to check, but to play online poker, or play spin palace blackjack for fun. I think no one will bother you to enjoy the game wherever you are if you play through the phones together online.
Lindsey · 45 weeks and 3 days ago
Les gars, aujourd'hui, il est très important d'avoir un endroit fiable qui génère des revenus. Heureusement, j'ai eu de la chance et je l'ai, mes conseils est un casino en ligne qui m'apporte un revenu régulier au quotidien. Ne gaspillez pas votre opportunité.
Cultin · 20 weeks and 4 days ago
How to check the honesty of an online casino? The first thing that should immediately catch your eye is the quality of the content and design of the online casino website. I highly reccomend to check online casino's you're playing on https://usacasinosanalyzer.com/. One-day offices are usually content with stereotyped cheap prices, which are created solely to attract naive players and take away funds. Good luck guys.
Laibor · 2 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: