Darko Fabijan wrote this on November 16, 2009

Configure git push

After upgrading to git 1.6.3 you’re likely to see a message like this:

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

Previous version of git have by default tried to push all branches. Now you have to specify the desired behaviour yourself. While matching is default, it can push other branches that may not be ready. For that reason, current is probably a better option:

git config --global push.default current

via

comments powered by Disqus

About Darko Fabijan

Rendered Text co-founder. Enjoys breaking new ground and exploring tools and ideas that make lives of developers interesting and productive. Nowadays has less time to write code but has great pleasure in discussing it with the team. He spends his free time cooking, hiking and indoor gardening.

Suggested Reads

Rails Testing Handbook

A new ebook on building test-driven Rails apps with RSpec and Cucumber.

At Rendered Text, we have a long history with Ruby on Rails. Checking the blog archive reminds me that we published first posts about working with Rails way back in 2009.

———

Rendered Text is a software company. For questions regarding Semaphore, please visit semaphoreci.com. Otherwise, feel free to get in touch any time by sending us an email.