Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 06:26:14 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DVCS ? (All about Git, Mercurial-Hg and the like...)  (Read 63050 times)

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,405
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #125 on: January 30, 2013, 05:48:40 PM »
Linus Torvalds - he tends to flip people off and call them nasty names and such - and now Evil Inc. is taking his baby and putting it into one of their big, nasty producst? Uh oh! :)

That sounds like a popcorn-worthy event. :)

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,125
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #126 on: January 31, 2013, 01:15:17 AM »
I was glad to see there is something like libgit2 that can be used for stuff like this, because quite frankly the half-baked msys smells-like-posix-spirit on top of Windows bash scripts all over the place official git is an abomination on Windows.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #127 on: January 31, 2013, 01:47:02 AM »
I was glad to see there is something like libgit2 that can be used for stuff like this, because quite frankly the half-baked msys smells-like-posix-spirit on top of Windows bash scripts all over the place official git is an abomination on Windows.
Yeah, nice to see that indeed!

It's IMHO insane to start a project like Git, pretty much knowing what scope you want, and then do it as a mess of C and shell scripts. I could almost understand it if this had been 10+ years ago, written by somebody with no prior DVCS experience (and not much experience in general)... but Linus? Ugh. If you start a project like that, you build it as a proper library + commandline client (client of the library!) from day 1.
- carpe noctem

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #128 on: January 31, 2013, 07:16:26 AM »
I was glad to see there is something like libgit2

Ooo, how nice.  Thanks for the link  :Thmbsup:

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,405
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #129 on: January 31, 2013, 09:27:20 AM »
I was glad to see there is something like libgit2

Ooo, how nice.  Thanks for the link  :Thmbsup:

Indeed!

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #130 on: January 31, 2013, 11:07:28 AM »
Aaaaand there's a sweet little Channel9 video on the topic, ~7min.
- carpe noctem

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,125
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #131 on: February 06, 2013, 02:03:51 AM »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,405
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #132 on: February 06, 2013, 05:55:22 AM »
Not me... but thanks for the heads up!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #133 on: February 07, 2013, 08:54:20 AM »
Maybe nothing that you didn't already know : Git Tips From the Pros

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,125
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #134 on: February 16, 2013, 05:18:41 AM »
In related news, it looks like BitBucket has been porting their git/mercurial client (SourceTree) to Windows as well:

http://blog.sourcetr...windows-beta-signup/

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #135 on: February 19, 2013, 10:32:22 PM »
Seems nice. Thanks Jibz.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #136 on: April 13, 2013, 12:52:33 AM »
After a botched interactive rebase session, learned about the "Lost Heads" functionality of the Log window in SmartGitHg.  (Apparently, something similar was possible before via Query | Load All Commits, but this functionality seems to have been removed in the 4.x series.)

IIUC, checking the checkbox next to "Lost Heads" in the "Branches" tab of the Log window leads to showing the content of the reflog in the "Commits" tab.

Once such commits can be seen, recovery was farily straight-forward.:

  • In the "Commits" tab, select the commit representing the state to "get back" to.
  • Create a new branch via "Add Branch...".
  • Point the original branch (e.g. master, if that's what was involved with the interactive rebase) at the newly created branch.



Quote
The Lost Heads will show all commit heads which are not accessible from a tag or branch.

via:
  http://www.syntevo.com/smartgithg/tour.html

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #137 on: April 13, 2013, 12:53:11 AM »
As a side note, I've disabled Preferences -> Commands -> Clean Up -> Periodically invoke Git's garbage collection when idle.

May be that makes it a bit easier to recover from my own errors...
« Last Edit: April 13, 2013, 01:00:49 AM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #138 on: April 13, 2013, 01:25:34 AM »
May be tagging the most recent commit before going through an interactive rebase is cheap way to make reverting easy (and upon success, deleting the tag)...

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #139 on: May 02, 2013, 04:46:12 AM »
SmartGit/Hg 4.5 was released recently.

Some interesting parts include:

  • Syntax coloring in some of the code viewing windows
  • Staging hunks from within the Changes tool window (haven't tested)
  • Additional polishing of Blame interface (tested a little)

via:

  What's New in SmartGit/Hg 4.5

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #140 on: June 15, 2013, 07:42:30 AM »
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

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #141 on: July 08, 2013, 09:48:19 PM »
I haven't used git flow, but it looks like a recent version (4.6?) of SmartGitHg added support for it.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #142 on: July 15, 2013, 12:05:55 AM »
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 :)

Cool tip! Thanks.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #143 on: July 17, 2013, 04:09:12 AM »
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

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #144 on: August 13, 2013, 05:43:48 AM »
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.

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,125
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #145 on: August 31, 2013, 05:21:40 AM »
After having used git a bit in SourceTree, I must admit that interactive staging is rather brilliant :-*.

For someone like me, who admittedly sometimes does drive-by-editing, being able to stage individual hunks is a really nice way to avoid commits that contain multiple unrelated changes.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #146 on: August 31, 2013, 05:25:33 AM »
being able to stage individual hunks is a really nice way to avoid commits that contain multiple unrelated changes.

Yes, yes, yes  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #147 on: August 31, 2013, 11:57:11 AM »
ewemoa was explaining this to me and i didn't get it until i tried it, but i must admit it is useful.
I've been using SmartGit client.

For those who don't know what we're talking about, it's this:

Traditionally with a version control system, you might make some changes to various files in your project, then you commit them as a set, and add a short description of the changes.

If you have made a bunch of completely different kinds of changes to lots of different files, this can lead to some confusing updates, like "Changed a whole bunch of stuff in different files".

So we're talking about the ability to interactively select a subset of files, commit those changes with a useful description of what's changed in THOSE FILES ONLY, and then repeat the process a number of times with different subsets of files.
« Last Edit: August 31, 2013, 05:59:29 PM by mouser »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #148 on: August 31, 2013, 05:29:10 PM »
FWIW, I didn't get it either until some experience had been digested :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #149 on: March 27, 2014, 02:53:23 AM »
For those using/interested in GIT this Infoworld article might be useful: Git smart! 20 essential tips for Git and GitHub users