{"thread":{"id":"62627","subject":"Git pull --rebase and --reset-author-date","startedAt":"2024-12-11T20:55:49Z","lastAt":"2024-12-13T03:31:17Z","messageCount":4,"participants":["Ricardo Almeida","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"509000","messageId":"CAMKQPDZWgq_qCdaL_S8cYYn=wtZSJiq6nP5aqFjvUZcFSnrTzQ@mail.gmail.com","threadId":"62627","inReplyTo":null,"subject":"Git pull --rebase and --reset-author-date","fromName":"Ricardo Almeida","fromEmail":"ric.almeida@gmail.com","sentAt":"2024-12-11T20:55:38Z","receivedAt":"2024-12-11T20:55:49Z","isPatch":false,"sender":{"key":"ric.almeida@gmail.com","avatar":null},"body":"Hi,\n\nI just learned about being able to use \"git rebase master\n--reset-author-date\" to, as the name implies, reset the author date of\nthe branch commits that will move to the top.\n\nBut, when working in a branch, I use \"git pull origin --rebase --stat\nmaster:master\" to update the master branch and rebase the current\nbranch with a single command (have it in an alias, to avoid typing it\nall). So, I tried to execute \"git pull origin --rebase\n--reset-author-date --stat master:master\" but it's not possible :(\n\nerror: unknown option `reset-author-date'\n\nSo, I was wondering if there's a similar option that can be used with\ngit pull --rebase or if I can request this feature to be added? :)\n\nRegards,\nRicardo Almeida\n"},{"id":"509010","messageId":"xmqqv7vpfv5g.fsf@gitster.g","threadId":"62627","inReplyTo":"CAMKQPDZWgq_qCdaL_S8cYYn=wtZSJiq6nP5aqFjvUZcFSnrTzQ@mail.gmail.com","subject":"Re: Git pull --rebase and --reset-author-date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-12-12T03:16:27Z","receivedAt":"2024-12-12T03:16:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ricardo Almeida <ric.almeida@gmail.com> writes:\n\n>\n> error: unknown option `reset-author-date'\n>\n> So, I was wondering if there's a similar option that can be used with\n> git pull --rebase or if I can request this feature to be added? :)\n\nCan't you just use \"git fetch && git rebase --...\" instead of \"pull\"\nshort-hand?\n\n"},{"id":"509018","messageId":"CAMKQPDaB2fP-4n9_bw1fjB7JntZ1DWMSpO01h5uuMJ-LzzufdQ@mail.gmail.com","threadId":"62627","inReplyTo":"xmqqv7vpfv5g.fsf@gitster.g","subject":"Re: Git pull --rebase and --reset-author-date","fromName":"Ricardo Almeida","fromEmail":"ric.almeida@gmail.com","sentAt":"2024-12-12T08:25:06Z","receivedAt":"2024-12-12T08:25:18Z","isPatch":false,"sender":{"key":"ric.almeida@gmail.com","avatar":null},"body":"Hi Junio,\n\n> Can't you just use \"git fetch && git rebase --...\" instead of \"pull\"\n> short-hand?\n\nBut then it wouldn't update the master branch... When I'm on myBranch\nand execute \"git pull origin --rebase --stat master:master\" it does\nbring the master branch up to date, so, it's equivalent to doing:\n\ngit checkout master\ngit pull\ngit checkout myBranch\ngit rebase master\n\nI have an alias for the pull command: \"alias.rb=pull origin --rebase\n--stat master:master\", so, it would be handier to just add the\n--reset-author-date to it but it's not supported atm :(\n\nRegards,\nRicardo Almeida\n"},{"id":"509038","messageId":"xmqq4j38fed9.fsf@gitster.g","threadId":"62627","inReplyTo":"CAMKQPDaB2fP-4n9_bw1fjB7JntZ1DWMSpO01h5uuMJ-LzzufdQ@mail.gmail.com","subject":"Re: Git pull --rebase and --reset-author-date","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-12-13T03:31:14Z","receivedAt":"2024-12-13T03:31:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ricardo Almeida <ric.almeida@gmail.com> writes:\n\n> Hi Junio,\n>\n>> Can't you just use \"git fetch && git rebase --...\" instead of \"pull\"\n>> short-hand?\n>\n> But then it wouldn't update the master branch... When I'm on myBranch\n> and execute \"git pull origin --rebase --stat master:master\" it does\n> bring the master branch up to date, so...\n\n\"git pull origin master:master\" is a bit unusal thing to say these\ndays, but the \"take their refs/heads/master, and copy it to my\nrefs/heads/master (as long as it results in a fast-forward update\nand as long as I am not on 'master')\" part of it can be reproduced\nby \"git fetch origin master:master\".  So I do not see what you see\nas a problem.  You are willing to be explicit to say that unusual\n\"directly update my local branch 'master'\" from the command line for\nyour \"git pull\", so I would imagine you are also OK with doing the\nsame with \"git fetch\" in the replacement.\n"}]}