* merge vs. rebase question
@ 2013-01-17 14:14 Dennis Putnam
2013-01-18 18:38 ` Phil Hord
0 siblings, 1 reply; 3+ messages in thread
From: Dennis Putnam @ 2013-01-17 14:14 UTC (permalink / raw)
To: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 955 bytes --]
As a git noob I am having trouble understanding when to use which
commands. I have a repository (bare) on my Linux server. I also created
a build directory as a local repository. In my build script I do a 'git
pull' to make sure the build directory is up to date. No changes are
made to my source so this repository never does an 'add' or 'commit'.
When I run my script with 'pull', the output indicates that changes were
found and seems to have pulled them into the local directory. However,
when I look at the resulting source, none of the expected changes show
up. I then tried a 'fetch' and 'rebase'. That worked but I don't
understand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't
understand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did
not. Unless my understanding of what 'pull' does is wrong. In my case,
what should I be using in my script to assure that the build directory
is current?
Thanks.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: merge vs. rebase question
2013-01-17 14:14 merge vs. rebase question Dennis Putnam
@ 2013-01-18 18:38 ` Phil Hord
2013-01-18 18:59 ` Dennis Putnam
0 siblings, 1 reply; 3+ messages in thread
From: Phil Hord @ 2013-01-18 18:38 UTC (permalink / raw)
To: Dennis Putnam; +Cc: git@vger.kernel.org
On Thu, Jan 17, 2013 at 9:14 AM, Dennis Putnam <dap1@bellsouth.net> wrote:
> As a git noob I am having trouble understanding when to use which
> commands. I have a repository (bare) on my Linux server. I also created
> a build directory as a local repository. In my build script I do a 'git
> pull' to make sure the build directory is up to date. No changes are
> made to my source so this repository never does an 'add' or 'commit'.
> When I run my script with 'pull', the output indicates that changes were
> found and seems to have pulled them into the local directory. However,
> when I look at the resulting source, none of the expected changes show
> up. I then tried a 'fetch' and 'rebase'. That worked but I don't
> understand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't
> understand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did
> not. Unless my understanding of what 'pull' does is wrong. In my case,
> what should I be using in my script to assure that the build directory
> is current?
If your build directory never has any source changes or new commits,
then pull is the right thing to do. You might want to use 'git pull
--ff-only' to guarantee that your build directory is not creating
merges unexpectedly.
You did not provide enough information to help figure out why your
pull is failing to achieve the results you expect. I suggest you
perform the pull manually in your build directory. If it fails, git
should tell you why. If it reports success but actually fails, you
can post a detailed explanation of the problem here so someone can
suggest the cause.
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: merge vs. rebase question
2013-01-18 18:38 ` Phil Hord
@ 2013-01-18 18:59 ` Dennis Putnam
0 siblings, 0 replies; 3+ messages in thread
From: Dennis Putnam @ 2013-01-18 18:59 UTC (permalink / raw)
To: git@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]
Thanks for the reply. I'm afraid this question has become moot. I can no
longer reproduce the problem as it is now working as expected. I did
find an incorrect ownership on one of the 'objects' sub-directories but
I would think that should have given me an error. Perhaps I used root at
the wrong time to do something and that changed the ownership. In any
case there is not much I can do at this point since the problem no
longer exists.
On 1/18/2013 1:38 PM, Phil Hord wrote:
> On Thu, Jan 17, 2013 at 9:14 AM, Dennis Putnam <dap1@bellsouth.net> wrote:
>> As a git noob I am having trouble understanding when to use which
>> commands. I have a repository (bare) on my Linux server. I also created
>> a build directory as a local repository. In my build script I do a 'git
>> pull' to make sure the build directory is up to date. No changes are
>> made to my source so this repository never does an 'add' or 'commit'.
>> When I run my script with 'pull', the output indicates that changes were
>> found and seems to have pulled them into the local directory. However,
>> when I look at the resulting source, none of the expected changes show
>> up. I then tried a 'fetch' and 'rebase'. That worked but I don't
>> understand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't
>> understand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did
>> not. Unless my understanding of what 'pull' does is wrong. In my case,
>> what should I be using in my script to assure that the build directory
>> is current?
> If your build directory never has any source changes or new commits,
> then pull is the right thing to do. You might want to use 'git pull
> --ff-only' to guarantee that your build directory is not creating
> merges unexpectedly.
>
> You did not provide enough information to help figure out why your
> pull is failing to achieve the results you expect. I suggest you
> perform the pull manually in your build directory. If it fails, git
> should tell you why. If it reports success but actually fails, you
> can post a detailed explanation of the problem here so someone can
> suggest the cause.
>
> Phil
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-18 19:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 14:14 merge vs. rebase question Dennis Putnam
2013-01-18 18:38 ` Phil Hord
2013-01-18 18:59 ` Dennis Putnam
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).