* config for merging master to test branch
@ 2009-12-28 23:38 Daniel Convissor
2009-12-29 16:43 ` Daniel Convissor
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Convissor @ 2009-12-28 23:38 UTC (permalink / raw)
To: Git Mailing List
Hello:
Here's my workflow...
testing directory (test branch)
[set origin to server repository]
git pull
git branch test
git checkout test
[edit settings files]
git commit ...
working directory (master branch)
[set origin to server repository]
[make changes]
git commit ...
git push origin master
Now, here's the question. I want to go back into the testing directory
and do a "git pull" and have the changes from master automatically merged
into my test branch in one step, without having to do an explicit set of
checkouts and merges. I get the impression there are configuration
settings that allow such to be done. Is my impression correct? If so,
what are the explicit configuration commands, please? Or is there some
command other than "pull" I should be using to do this?
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: config for merging master to test branch
2009-12-28 23:38 config for merging master to test branch Daniel Convissor
@ 2009-12-29 16:43 ` Daniel Convissor
2009-12-29 16:53 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Convissor @ 2009-12-29 16:43 UTC (permalink / raw)
To: Git Mailing List
Hello Again Folks:
On Mon, Dec 28, 2009 at 06:38:39PM -0500, Daniel Convissor wrote:
>
> Now, here's the question. I want to go back into the testing directory
> and do a "git pull" and have the changes from master automatically merged
> into my test branch in one step, without having to do an explicit set of
> checkouts and merges.
I found this is possible by being in the "test" checkout and calling
"git pull origin master". Is this the best way to do it?
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: config for merging master to test branch
2009-12-29 16:43 ` Daniel Convissor
@ 2009-12-29 16:53 ` Junio C Hamano
2009-12-29 17:56 ` Daniel Convissor
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2009-12-29 16:53 UTC (permalink / raw)
To: Daniel Convissor; +Cc: Git Mailing List
Daniel Convissor <danielc@analysisandsolutions.com> writes:
> On Mon, Dec 28, 2009 at 06:38:39PM -0500, Daniel Convissor wrote:
>>
>> Now, here's the question. I want to go back into the testing directory
>> and do a "git pull" and have the changes from master automatically merged
>> into my test branch in one step, without having to do an explicit set of
>> checkouts and merges.
>
> I found this is possible by being in the "test" checkout and calling
> "git pull origin master". Is this the best way to do it?
Good. That is how it was designed to be used ;-)
If you feel lazy and want to omit typing " origin master", you could add a
few configuration items in your .git/config in the test repository.
[branch "test"]
remote = origin
merge = refs/heads/master
That configures git in such a way that...
When on branch "test", "pull" and "fetch" by default interact with the
"origin" repository, and "pull" integrates what was found on the
'master' branch from that remote into your history.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: config for merging master to test branch
2009-12-29 16:53 ` Junio C Hamano
@ 2009-12-29 17:56 ` Daniel Convissor
2009-12-29 18:32 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Convissor @ 2009-12-29 17:56 UTC (permalink / raw)
To: Git Mailing List
Hi Junio:
> Good. That is how it was designed to be used ;-)
Thanks for the reassurance.
> [branch "test"]
> remote = origin
> merge = refs/heads/master
>
> When on branch "test", "pull" and "fetch" by default interact with the
> "origin" repository, and "pull" integrates what was found on the
> 'master' branch from that remote into your history.
Excellent. Initially, I wasn't sure what the following commands did:
git config branch.test.remote origin
git config branch.test.merge refs/heads/master
Between further reading and your explanation I now understand it better.
"refs/heads/master" refers items displayed by "git show-ref".
So what is "refs/remotes/origin/master", please?
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: config for merging master to test branch
2009-12-29 17:56 ` Daniel Convissor
@ 2009-12-29 18:32 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2009-12-29 18:32 UTC (permalink / raw)
To: Daniel Convissor; +Cc: Git Mailing List
Daniel Convissor <danielc@analysisandsolutions.com> writes:
> Excellent. Initially, I wasn't sure what the following commands did:
>
> git config branch.test.remote origin
> git config branch.test.merge refs/heads/master
>
> Between further reading and your explanation I now understand it better.
> "refs/heads/master" refers items displayed by "git show-ref".
Not quite. refs/heads/master there refers to the _local_ master branch,
but it is _local_ with respect to the origin repository, not your
repository. "git show-ref" is about showing refs in _your_ repository.
> So what is "refs/remotes/origin/master", please?
http://gitster.livejournal.com/30313.html
If you read Japanese, you may also want to read Ch.13 of my book ;-)
The refs/remotes/ hierarchy is used to store a copy of the branch tips
fetched from the named remotes (like "origin").
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-29 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28 23:38 config for merging master to test branch Daniel Convissor
2009-12-29 16:43 ` Daniel Convissor
2009-12-29 16:53 ` Junio C Hamano
2009-12-29 17:56 ` Daniel Convissor
2009-12-29 18:32 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).