From: brett l. <bre...@gm...> - 2012-10-06 18:38:35
|
On Sat, Oct 6, 2012 at 1:58 PM, Erik Vos <eri...@xs...> wrote: >> > remote.origin.push=refs/heads/master:refs/heads/master >> >> This line isn't needed. A better way (imo) would be to set an alias. >> >> But it's also functionally equivalent to "git push origin master" > > I don't trust myself remembering that every time. > It's a learning process. The more you work with it, the easier it becomes. :-) > What I want is to have 'git push' upload just the one (maybe two) branch(es) > with which I work, or into which I merge my local branches. > All my own local branches that do not exist in the remote repo should be > excluded from uploading. > I want just the simple 'git push' do that, as it does now, because the > current configuration makes me push 'master' only. > > How can I set that up without 'remote.origin.push'? > That's the default behavior. "Git push" doesn't blindly upload everything. It only syncs the branches that you've selected as remote tracking branches. Everything else stays local. This is why the typical git workflow is to use lots of local branches that you merge to master when a particular feature is ready. So, in your current config, a git push would only consider master, because it's the only remote-tracking branch that's checked out. > Erik. > > ---Brett. |