About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

Streamlining a GIT Push

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 500
This Year: 9
This Month: 1
This Week: 0
Comments: 1549

 Tuesday, June 30, 2009
Tuesday, June 30, 2009 2:00:00 PM (Mountain Standard Time, UTC-07:00) ( git | Tools )

So you are using git you've done some work on your branch, everything is committed and you want to do a push to a remote repository. If you have used simple defaults to configure your repository then it is very possible that you will receive this message when you attempt to do a git push without any arguments:

image

The reason for this is because by default git tries to push all matching refspecs which is not usually what you want to do. There are a couple of places you can configure this if you do not want to receive this message. You can configure this at a repository level by running the following command from the shell (in the repository folder):

git config push.default [setting]

Where [setting] is one of the following values:

- nothing
- matching
- tracking
- current

Currently the setting that I find myself using the most is current. By setting this setting it allows me to do a push by simply running git push without any arguments.

Of course, if this is your default then you can create a fallback setting in your .gitconfig file that will be used in the event that a repository you are working in has not got a push.default configured. To do this just add the following entry into your .gitconfig file:

[push]
  default = current

This ensures that if you happen to be working in a repository that does not explicitly have push.default set, then when you do a push without any arguments it will not attempt to push all matching branches, only the current branch you are working on.

Develop With Passion!!

Comments [0] | | #