* Idea for git-touch @ 2009-11-12 16:15 Luís Sousa 2009-11-12 17:01 ` Jan Krüger 2009-11-12 17:18 ` Michele Ballabio 0 siblings, 2 replies; 7+ messages in thread From: Luís Sousa @ 2009-11-12 16:15 UTC (permalink / raw) To: git Hi all, I have been using GIT for several time and I love it. I normally do commits when something works or on the end of the day, just to record what have doing. On other day, when I consider that is done/working I do a rebase -i squashing everything on one commit. The date of that commit will be preserved and is the date of the first commit. Then I do a git-reset HEAD~1, git-add . and git-commit with the same message to have the current date. A nice functionality was a git-touch that did the commands before. Best regards and keep the good work, Luís Sousa P.S.: While writing this message I realize that is easy to accomplish a git-touch doing a bash script, but probably is a good idea to share. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Idea for git-touch 2009-11-12 16:15 Idea for git-touch Luís Sousa @ 2009-11-12 17:01 ` Jan Krüger 2009-11-12 17:05 ` Luís Sousa 2009-11-12 17:18 ` Michele Ballabio 1 sibling, 1 reply; 7+ messages in thread From: Jan Krüger @ 2009-11-12 17:01 UTC (permalink / raw) To: Luís Sousa; +Cc: git Hi Luís, > [...] Then I do a git-reset HEAD~1, git-add . and git-commit with > the same message to have the current date. There is an existing command that does pretty much exactly that: git commit --amend. Jan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Idea for git-touch 2009-11-12 17:01 ` Jan Krüger @ 2009-11-12 17:05 ` Luís Sousa 2009-11-12 17:08 ` Jan Krüger 0 siblings, 1 reply; 7+ messages in thread From: Luís Sousa @ 2009-11-12 17:05 UTC (permalink / raw) To: git But still preserves the original date, isn't it? Jan Krüger wrote: > Hi Luís, > > >> [...] Then I do a git-reset HEAD~1, git-add . and git-commit with >> the same message to have the current date. >> > > There is an existing command that does pretty much exactly that: > git commit --amend. > > Jan > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Idea for git-touch 2009-11-12 17:05 ` Luís Sousa @ 2009-11-12 17:08 ` Jan Krüger 2009-11-12 17:13 ` Luís Sousa 0 siblings, 1 reply; 7+ messages in thread From: Jan Krüger @ 2009-11-12 17:08 UTC (permalink / raw) To: Luís Sousa; +Cc: git On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote: > But still preserves the original date, isn't it? Yes, and I just remembered that, too. Sorry. Today is not my day. Even so, you can still save one command: git reset --soft HEAD^ git commit Jan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Idea for git-touch 2009-11-12 17:08 ` Jan Krüger @ 2009-11-12 17:13 ` Luís Sousa [not found] ` <4AFD26ED.4020602@op5.se> 0 siblings, 1 reply; 7+ messages in thread From: Luís Sousa @ 2009-11-12 17:13 UTC (permalink / raw) To: Jan Krüger; +Cc: git Yeah, but still need some copy&paste of message :) Jan Krüger wrote: > On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote: > >> But still preserves the original date, isn't it? >> > > Yes, and I just remembered that, too. Sorry. Today is not my day. > > Even so, you can still save one command: > > git reset --soft HEAD^ > git commit > > Jan > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <4AFD26ED.4020602@op5.se>]
* Re: Idea for git-touch [not found] ` <4AFD26ED.4020602@op5.se> @ 2009-11-16 10:57 ` Luís Sousa 0 siblings, 0 replies; 7+ messages in thread From: Luís Sousa @ 2009-11-16 10:57 UTC (permalink / raw) To: Andreas Ericsson; +Cc: git Andreas Ericsson wrote: > On 11/12/2009 06:13 PM, Luís Sousa wrote: >> Yeah, but still need some copy&paste of message :) >> >> Jan Krüger wrote: >>> On Thu, 12 Nov 2009 17:05:21 +0000, Luís Sousa <llsousa@ualg.pt> wrote: >>>> But still preserves the original date, isn't it? >>> >>> Yes, and I just remembered that, too. Sorry. Today is not my day. >>> >>> Even so, you can still save one command: >>> >>> git reset --soft HEAD^ >>> git commit >>> > Thanks, but still preserves timestamp. > Make that > > git reset --soft HEAD^ && git commit -C ORIG_HEAD > > and you won't have to bother with copy-pasting. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Idea for git-touch 2009-11-12 16:15 Idea for git-touch Luís Sousa 2009-11-12 17:01 ` Jan Krüger @ 2009-11-12 17:18 ` Michele Ballabio 1 sibling, 0 replies; 7+ messages in thread From: Michele Ballabio @ 2009-11-12 17:18 UTC (permalink / raw) To: Luís Sousa; +Cc: git On Thursday 12 November 2009, Luís Sousa wrote: > I normally do commits when something works or on the end of the day, > just to record what have doing. On other day, when I consider that is > done/working I do a rebase -i squashing everything on one commit. The > date of that commit will be preserved and is the date of the first > commit. Then I do a git-reset HEAD~1, git-add . and git-commit with the > same message to have the current date. git rebase -i <...> git rebase --ignore-date <...> should do what you need. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-16 10:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-12 16:15 Idea for git-touch Luís Sousa 2009-11-12 17:01 ` Jan Krüger 2009-11-12 17:05 ` Luís Sousa 2009-11-12 17:08 ` Jan Krüger 2009-11-12 17:13 ` Luís Sousa [not found] ` <4AFD26ED.4020602@op5.se> 2009-11-16 10:57 ` Luís Sousa 2009-11-12 17:18 ` Michele Ballabio
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).