ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

DVCS ? (All about Git, Mercurial-Hg and the like...)

<< < (29/39) > >>

ewemoa:
I have been using the following handy tip in SmartGitHg recently with some success:

Depending on the conditions, I found it's possible to modify the content of commits older than the most recent [1].

The most recent commit can be made available for editing via the "Undo Last Commit" command.  Sometimes it's possible to use the "Reorder Commits" command to make an older commit the most recent commit.  Once that is done, the "Undo Last Commit" command can be applied to it, modifications performed, and a new replacement commit can be created.  It may then be possible to reorder the new commit back into its original position (so-to-speak).

When this works I find it simpler than doing git rebase -i <sha-of-parent-commit-of-interest> from the command line.


[1] Strictly speaking the commit isn't being modified -- a new sequence of commits is created with appropriate content, but I assume most folks interested in doing this sort of thing know this already :)

ewemoa:
I haven't used git flow, but it looks like a recent version (4.6?) of SmartGitHg added support for it.

Armando:
Hey, thanks for keeping this thread alive, ewemoa ! I lost track of it in February.

I have been using the following handy tip in SmartGitHg recently with some success:

Depending on the conditions, I found it's possible to modify the content of commits older than the most recent [1].

The most recent commit can be made available for editing via the "Undo Last Commit" command.  Sometimes it's possible to use the "Reorder Commits" command to make an older commit the most recent commit.  Once that is done, the "Undo Last Commit" command can be applied to it, modifications performed, and a new replacement commit can be created.  It may then be possible to reorder the new commit back into its original position (so-to-speak).

When this works I find it simpler than doing git rebase -i <sha-of-parent-commit-of-interest> from the command line.


[1] Strictly speaking the commit isn't being modified -- a new sequence of commits is created with appropriate content, but I assume most folks interested in doing this sort of thing know this already :)
-ewemoa (June 15, 2013, 07:42 AM)
--- End quote ---

Cool tip! Thanks.

ewemoa:
As might be expected, I have been finding that the tip tends to work better for more recent commits...


On a side note, I lost data twice recently -- only a small amount luckily -- possibly through pilot error or perhaps it has to do with how I tend to use git (a tendency to try to pull apart multiple changes in the working tree and selectively commit them).


Out of curiosity, has anyone come across instructions on using a GUI merge tool (e.g. meld) to do essentially what SmartGitHg's "Index Editor" does?

Also came across tig.  Anyone tried it?

mouser:
Just wanted to say that thanks to a lesson from dc user ewemoa, I've been using SmartGit for a new open source project (Mewlo) and I'm very pleased with it.

I'm only using the basic functionality, but once you understand the basics of how to use it, it really is a pleasure to use, and i love how easy it is to deal with deleting and adding files, and how the user interface automatically detects changed files, etc.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version