Reputation: 3483
I've seen people use
$ git push
and it pushes to their default remote repo/branch
I've been using
$ git push hm master
What settings do I need to change so when I type:
$ git push
I don't see this error:
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
Upvotes: 1
Views: 819
Reputation: 59811
git push
will try to push to the upstream repository. It looks like you have non configured for your branch. Use git branch --set-upstream [local_branch_name] [remote_name/remote_branch_name]
Upvotes: 2
Reputation: 302
You won't be able to do this, unless you do some wonky custom script in bash which intercepts your git command and automatically adds the [alias] [branch] elements to git push. Git has to know what to push and where. For comparison, bear in mind that you can't do a grep without any additional variables, because it just won't do anything.
Upvotes: 0