Apr
27
Posted on 27-04-2010
Filed Under (git, linux) by Leandro Nunes on 27-04-2010

Se você atualizou a sua versão do git para a 1.6.3.3 como eu vai ficar assustado depois de dar um git push.

Você vai se deparar com isso:

warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated.  This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning:   'nothing'  : Do not push anything
warning:   'matching' : Push all matching branches (default)
warning:   'tracking' : Push the current branch to whatever it is tracking
warning:   'current'  : Push the current branch

Pode ficar tranquilo que não foi uma falha de segmentação no seu SO, mas sim uma mensagem de Warning que o novo git trás para te avisar que você precisa configurar a variável:

push.default

É claro que o seu comando vai continuar funcionando perfeitamente como sempre funcionou se você não configurar essa variável, mas você vai ficar agoniado com essa mensagem imensa de warning aparecendo toda hora na sua tela.

Acredite em mim :)

Então para ajeitar isso basta configurar variável com o comando:

git config push.default matching

Se você deseja que esta seja uma configuração padrão para todos os seus repositórios digite o comando:

git config --global push.default matching
Post a Comment
Name:
Email:
Website:
Comments:
eXTReMe Tracker