{"thread":{"id":"32655","subject":"merge vs. rebase question","startedAt":"2013-01-17T14:14:23Z","lastAt":"2013-01-18T18:59:50Z","messageCount":3,"participants":["Dennis Putnam","Phil Hord"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"207145","messageId":"50F8073F.90304@bellsouth.net","threadId":"32655","inReplyTo":null,"subject":"merge vs. rebase question","fromName":"Dennis Putnam","fromEmail":"dap1@bellsouth.net","sentAt":"2013-01-17T14:14:23Z","receivedAt":"2013-01-17T14:14:23Z","isPatch":false,"sender":{"key":"dap1@bellsouth.net","avatar":null},"body":"As a git noob I am having trouble understanding when to use which\ncommands. I have a repository (bare) on my Linux server. I also created\na build directory as a local repository. In my build script I do a 'git\npull' to make sure the build directory is up to date. No changes are\nmade to my source so this repository never does an 'add' or 'commit'.\nWhen I run my script with 'pull', the output indicates that changes were\nfound and seems to have pulled them into the local directory. However,\nwhen I look at the resulting source, none of the expected changes show\nup. I then tried a 'fetch' and 'rebase'. That worked but I don't\nunderstand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't\nunderstand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did\nnot. Unless my understanding of what 'pull' does is wrong. In my case,\nwhat should I be using in my script to assure that the build directory\nis current?\n\nThanks.\n\n"},{"id":"207209","messageId":"CABURp0rTNh4Xe4h6RwvDgQaBKJFq-ami-wO+X0mR5hiubaF7mw@mail.gmail.com","threadId":"32655","inReplyTo":"50F8073F.90304@bellsouth.net","subject":"Re: merge vs. rebase question","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2013-01-18T18:38:49Z","receivedAt":"2013-01-18T18:38:49Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Thu, Jan 17, 2013 at 9:14 AM, Dennis Putnam <dap1@bellsouth.net> wrote:\n> As a git noob I am having trouble understanding when to use which\n> commands. I have a repository (bare) on my Linux server. I also created\n> a build directory as a local repository. In my build script I do a 'git\n> pull' to make sure the build directory is up to date. No changes are\n> made to my source so this repository never does an 'add' or 'commit'.\n> When I run my script with 'pull', the output indicates that changes were\n> found and seems to have pulled them into the local directory. However,\n> when I look at the resulting source, none of the expected changes show\n> up. I then tried a 'fetch' and 'rebase'. That worked but I don't\n> understand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't\n> understand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did\n> not. Unless my understanding of what 'pull' does is wrong. In my case,\n> what should I be using in my script to assure that the build directory\n> is current?\n\nIf your build directory never has any source changes or new commits,\nthen pull is the right thing to do.  You might want to use 'git pull\n--ff-only' to guarantee that your build directory is not creating\nmerges unexpectedly.\n\nYou did not provide enough information to help figure out why your\npull is failing to achieve the results you expect.  I suggest you\nperform the pull manually in your build directory.  If it fails, git\nshould tell you why.  If it reports success but actually fails, you\ncan post a detailed explanation of the problem here so someone can\nsuggest the cause.\n\nPhil\n"},{"id":"207213","messageId":"50F99BA6.5010204@bellsouth.net","threadId":"32655","inReplyTo":"CABURp0rTNh4Xe4h6RwvDgQaBKJFq-ami-wO+X0mR5hiubaF7mw@mail.gmail.com","subject":"Re: merge vs. rebase question","fromName":"Dennis Putnam","fromEmail":"dap1@bellsouth.net","sentAt":"2013-01-18T18:59:50Z","receivedAt":"2013-01-18T18:59:50Z","isPatch":false,"sender":{"key":"dap1@bellsouth.net","avatar":null},"body":"Thanks for the reply. I'm afraid this question has become moot. I can no\nlonger reproduce the problem as it is now working as expected. I did\nfind an incorrect ownership on one of the 'objects' sub-directories but\nI would think that should have given me an error. Perhaps I used root at\nthe wrong time to do something and that changed the ownership. In any\ncase there is not much I can do at this point since the problem no\nlonger exists.\n\nOn 1/18/2013 1:38 PM, Phil Hord wrote:\n> On Thu, Jan 17, 2013 at 9:14 AM, Dennis Putnam <dap1@bellsouth.net> wrote:\n>> As a git noob I am having trouble understanding when to use which\n>> commands. I have a repository (bare) on my Linux server. I also created\n>> a build directory as a local repository. In my build script I do a 'git\n>> pull' to make sure the build directory is up to date. No changes are\n>> made to my source so this repository never does an 'add' or 'commit'.\n>> When I run my script with 'pull', the output indicates that changes were\n>> found and seems to have pulled them into the local directory. However,\n>> when I look at the resulting source, none of the expected changes show\n>> up. I then tried a 'fetch' and 'rebase'. That worked but I don't\n>> understand why. I thought 'pull' did a 'fetch' and a 'merge' so I don't\n>> understand why a 'fetch' and 'rebase' worked but 'fetch' and 'merge' did\n>> not. Unless my understanding of what 'pull' does is wrong. In my case,\n>> what should I be using in my script to assure that the build directory\n>> is current?\n> If your build directory never has any source changes or new commits,\n> then pull is the right thing to do.  You might want to use 'git pull\n> --ff-only' to guarantee that your build directory is not creating\n> merges unexpectedly.\n>\n> You did not provide enough information to help figure out why your\n> pull is failing to achieve the results you expect.  I suggest you\n> perform the pull manually in your build directory.  If it fails, git\n> should tell you why.  If it reports success but actually fails, you\n> can post a detailed explanation of the problem here so someone can\n> suggest the cause.\n>\n> Phil\n>\n\n\n"}]}