On 16 October 2013 12:06,  <shlo.af...@gmail.com> wrote:
> git 1.8.4
> output of 'git remote -v'
> origin  user@gitservre:/path/to/dir/projectd.git (fetch)
> origin  user@gitservre:/path/to/dir/projectd.git (push)
> I saw now that you send me another email, and I tried 'git push origin
> master' and it start working.
> Now 'git push' also work. I don't know what cause the problem.  Maybe
> something on the server?
> If you have any idea I will be happy to know.

I understand why you are confused.

"git push" does default to the origin repository (which is normally
the repository from which you cloned the current repository),
but it does not default to pushing the current branch.
Instead it defaults to pushing only branches that exist in both the
source repository and the destination repository.

The config variable push.default controls how git works when you write
"git push"
See the value with: git config push.default

The manual says this:

git config --help | grep -A25 push.default
           Defines the action git push should take if no refspec is
given on the command line, no refspec is configured in the remote, and
no refspec is implied by any of the
           options given on the command line. Possible values are:

           ·   nothing - do not push anything.

           ·   matching - push all branches having the same name in
both ends. This is for those who prepare all the branches into a
publishable shape and then push them out with a
               single command. It is not appropriate for pushing into
a repository shared by multiple users, since locally stalled branches
will attempt a non-fast forward push if
               other users updated the branch.

               This is currently the default, but Git 2.0 will change
the default to simple.

           ·   upstream - push the current branch to its upstream
branch (tracking is a deprecated synonym for this). With this, git
push will update the same remote ref as the one
               which is merged by git pull, making push and pull
symmetrical. See "branch.<name>.merge" for how to configure the
upstream branch.

           ·   simple - like upstream, but refuses to push if the
upstream branch’s name is different from the local one. This is the
safest option and is well-suited for
               beginners. It will become the default in Git 2.0.

           ·   current - push the current branch to a branch of the same name.

           The simple, current and upstream modes are for those who
want to push out a single branch after finishing work, even when the
other branches are not yet ready to be
           pushed out. If you are working with other people to push
into the same shared repository, you would want to use one of these.


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to