{"thread":{"id":"21592","subject":"Idea for git-touch","startedAt":"2009-11-12T16:15:07Z","lastAt":"2009-11-16T10:57:43Z","messageCount":7,"participants":["Luís Sousa","Jan Krüger","Michele Ballabio"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127455","messageId":"4AFC348B.4000202@ualg.pt","threadId":"21592","inReplyTo":null,"subject":"Idea for git-touch","fromName":"Luís Sousa","fromEmail":"llsousa@ualg.pt","sentAt":"2009-11-12T16:15:07Z","receivedAt":"2009-11-12T16:15:07Z","isPatch":false,"sender":{"key":"llsousa@ualg.pt","avatar":null},"body":"Hi all,\n\nI have been using GIT for several time and I love it.\n\nI normally do commits when something works or on the end of the day, \njust to record what have doing. On other day, when I consider that is \ndone/working I do a rebase -i squashing everything on one commit. The \ndate of that commit will be preserved and is the date of the first \ncommit. Then I do a git-reset HEAD~1, git-add . and git-commit with the \nsame message to have the current date.\n\nA nice functionality was a git-touch that did the commands before.\n\nBest regards and keep the good work,\nLuís Sousa\n\nP.S.: While writing this message I realize that is easy to accomplish a \ngit-touch doing a bash script, but probably is a good idea to share.\n"},{"id":"127457","messageId":"20091112180132.5819f963@perceptron","threadId":"21592","inReplyTo":"4AFC348B.4000202@ualg.pt","subject":"Re: Idea for git-touch","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-11-12T17:01:32Z","receivedAt":"2009-11-12T17:01:32Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Hi Luís,\n\n> [...] Then I do a git-reset HEAD~1, git-add . and git-commit with\n> the same message to have the current date.\n\nThere is an existing command that does pretty much exactly that:\ngit commit --amend.\n\nJan\n"},{"id":"127459","messageId":"4AFC4051.5030607@ualg.pt","threadId":"21592","inReplyTo":"20091112180132.5819f963@perceptron","subject":"Re: Idea for git-touch","fromName":"Luís Sousa","fromEmail":"llsousa@ualg.pt","sentAt":"2009-11-12T17:05:21Z","receivedAt":"2009-11-12T17:05:21Z","isPatch":false,"sender":{"key":"llsousa@ualg.pt","avatar":null},"body":"But still preserves the original date, isn't it?\n\nJan Krüger wrote:\n> Hi Luís,\n>\n>   \n>> [...] Then I do a git-reset HEAD~1, git-add . and git-commit with\n>> the same message to have the current date.\n>>     \n>\n> There is an existing command that does pretty much exactly that:\n> git commit --amend.\n>\n> Jan\n>\n>\n>   \n"},{"id":"127460","messageId":"20091112180841.001ae651@perceptron","threadId":"21592","inReplyTo":"4AFC4051.5030607@ualg.pt","subject":"Re: Idea for git-touch","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-11-12T17:08:41Z","receivedAt":"2009-11-12T17:08:41Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote:\n> But still preserves the original date, isn't it?\n\nYes, and I just remembered that, too. Sorry. Today is not my day.\n\nEven so, you can still save one command:\n\n  git reset --soft HEAD^\n  git commit\n\nJan\n"},{"id":"127461","messageId":"4AFC421D.1090509@ualg.pt","threadId":"21592","inReplyTo":"20091112180841.001ae651@perceptron","subject":"Re: Idea for git-touch","fromName":"Luís Sousa","fromEmail":"llsousa@ualg.pt","sentAt":"2009-11-12T17:13:01Z","receivedAt":"2009-11-12T17:13:01Z","isPatch":false,"sender":{"key":"llsousa@ualg.pt","avatar":null},"body":"Yeah, but still need some copy&paste of message :)\n\nJan Krüger wrote:\n> On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote:\n>   \n>> But still preserves the original date, isn't it?\n>>     \n>\n> Yes, and I just remembered that, too. Sorry. Today is not my day.\n>\n> Even so, you can still save one command:\n>\n>   git reset --soft HEAD^\n>   git commit\n>\n> Jan\n>\n>\n>   \n"},{"id":"127462","messageId":"200911121818.02502.barra_cuda@katamail.com","threadId":"21592","inReplyTo":"4AFC348B.4000202@ualg.pt","subject":"Re: Idea for git-touch","fromName":"Michele Ballabio","fromEmail":"barra_cuda@katamail.com","sentAt":"2009-11-12T17:18:01Z","receivedAt":"2009-11-12T17:18:01Z","isPatch":false,"sender":{"key":"barra_cuda@katamail.com","avatar":"https://avatars.githubusercontent.com/u/16371673?v=4"},"body":"On Thursday 12 November 2009, Luís Sousa wrote:\n> I normally do commits when something works or on the end of the day, \n> just to record what have doing. On other day, when I consider that is \n> done/working I do a rebase -i squashing everything on one commit. The \n> date of that commit will be preserved and is the date of the first \n> commit. Then I do a git-reset HEAD~1, git-add . and git-commit with the \n> same message to have the current date.\n\ngit rebase -i <...>\ngit rebase --ignore-date <...>\n\nshould do what you need.\n"},{"id":"127673","messageId":"4B013027.3040508@ualg.pt","threadId":"21592","inReplyTo":"4AFD26ED.4020602@op5.se","subject":"Re: Idea for git-touch","fromName":"Luís Sousa","fromEmail":"llsousa@ualg.pt","sentAt":"2009-11-16T10:57:43Z","receivedAt":"2009-11-16T10:57:43Z","isPatch":false,"sender":{"key":"llsousa@ualg.pt","avatar":null},"body":"Andreas Ericsson wrote:\n> On 11/12/2009 06:13 PM, Luís Sousa wrote:\n>> Yeah, but still need some copy&paste of message :)\n>>\n>> Jan Krüger wrote:\n>>> On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote:\n>>>> But still preserves the original date, isn't it?\n>>>\n>>> Yes, and I just remembered that, too. Sorry. Today is not my day.\n>>>\n>>> Even so, you can still save one command:\n>>>\n>>> git reset --soft HEAD^\n>>> git commit\n>>>\n>\n\nThanks, but still preserves timestamp.\n\n> Make that\n>\n>    git reset --soft HEAD^ && git commit -C ORIG_HEAD\n>\n> and you won't have to bother with copy-pasting.\n>\n"}]}