DonationCoder.com Forum

Main Area and Open Discussion => General Software Discussion => Topic started by: Armando on February 19, 2011, 02:39 PM

Title: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on February 19, 2011, 02:39 PM
DVCS : what system to you use... And why ? I'm also generally curious about the context in which you use it (e.g. : working alone or in a team ? purely for code  ?)...

===

Some background info ?

There's been several discussions about version control systems here, but only a few about DVCS and its open systems (Git, Mercurial...). I admit I installed Tortoise SVN a while ago and never used it. Instead I rely on a few different tools like AutoVer, time stamped backups, notes, etc.

I'm currently working on a coding project (my first "real" one in fact), and am wondering if I should be more rigorous about version control etc. But since I have perfectionist tendencies and tend to loose time on details and unnecessary stuff, I want to avoid getting into something that might be very interesting (no doubt...) BUT that will slow me down for months without giving me any concrete benefits. So... if you have any advice concerning that matter... Thanks. :)
Title: Re: DVCS ?
Post by: Ath on February 19, 2011, 02:59 PM
... But since I have perfectionist tendencies...
With that said: Do get some kind of VCS!

If working alone or in a small local team (in the same office): Get SVN, it's easy to set up (locally) and very well documented.
If working in a geographically 'wide area' or a large group of people, get GIT or Mercurial and a hosted central server, or create a project at SourceForge with SVN if somebody really wants that to be used.
Title: Re: DVCS ?
Post by: Armando on February 20, 2011, 04:18 PM
Thanks for taking the time to answer. I was thinking of getting acquainted with Tortoise SVN (as I said, it's already installed on my computer, etc.). But then I read comments (mainly from f0dder) about GIT, Mercurial and the like... and how annoying SVN could become in some contexts.

Since all these version control systems seem to take a fair number of hours to get truly familiar with their mechanism and features, I just want to make sure I don't uselessly invest time in a one of them to discover I should've invested energy in "the another one".

So... From what you say ("If working alone or in a small local team (in the same office)"), I should just start working with I've got installed : tortoise SVN. Does that mean that GIT or Mercurial aren't good for these contexts (or not worth the effort) ?
Title: Re: DVCS ?
Post by: mwb1100 on February 20, 2011, 04:32 PM
I mainly use SVN right now.  If I were starting from nothing, I think I'd consider Mercurial over SVN - it seems less complex than Git and seem a bit more Windows friendly.  TortoiseHg seems to be as featured as TortoiseSVN (and I think that this is a testament to the TortoiseSVN project, since I think that TortoiseHg used that as a starting point).  I'm considering converting my personal SVN repository to Mercurial, and hosting it on https://bitbucket.org/ where you can have free private repositories.  If bitbucket ever goes away, that's not a big deal since any workspace I have is essentially a full backup of the repository.  Moving my hosted SVN stuff was a bit of a pain when my 1st hoster dropped their free plans.

I think that for most projects (even with a DVCS), you'll still likely have a central 'repository of record' (where your official builds will work from), but I think the especially in a single user or very small team environment, not needing a central server can be really nice.

If you're going to be working on Linux kernel stuff, Git is the obvious choice.

All that said, SVN is still a fine choice, and if you're going to be working with a team that's already familiar with it, I'd lean in that direction.
Title: Re: DVCS ?
Post by: f0dder on February 20, 2011, 05:39 PM
OK, there's several things to address here.

First things first: get some version control, right now. Even if you're never going to collaborate with other people, you'll learn to appreciate it. VCS serves as part of a backup scheme, it's easier to find particular versions of your source code than dealing with timestamped copies, and once you become disciplined and write proper commit messages and commit at a proper granularity, you'll see you have some powerful tools at hand to search history, track regressions, managed branches et cetera. It does take a bit getting really used to VCS and reap all the benefits, but it's worth investing time in it.

Next, move to either Mercurial or Git right away, go right past Subversion and don't collect the... oh wait, this isn't monopoly. But do avoid svn even if you aren't going to use the distributed features of Hg or Git. Why? If nothing else, speed. A list:


Tortoise is available for Mercurial as well as Git, even if not entirely as polished as TortoiseSvn. Git is probably the system that feels least polished at the moment, but it's entirely usable.

I'm not sure which one to recommend, though. Git does have all the geekboypowerhead features, and you can definitely blast off your legs with the command line tool...  But if you stick with basic features, it's really not that bad. Both Hg and Git can be used for pretty much the same workflow as you have with Subversion, so IMHO there's not much use to stick with svn unless you have to for interop reasons.

You should probably start by checking out Mercurial and TortoiseHg. Chances are you won't need to look at any of the other projects after that. And if you stay clear of svn, you won't need to muck around with converting your repositories when you feel like ditching it at some later point :)
Title: Re: DVCS ?
Post by: Armando on February 20, 2011, 06:55 PM
This is very good info and I appreciate it tremendously. Thanks to you 3 for your generosity.  :-*

With that said: Do get some kind of VCS!
get some version control, right now. Even if you're never going to collaborate with other people, you'll learn to appreciate it. VCS serves as part of a backup scheme, it's easier to find particular versions of your source code than dealing with timestamped copies, and once you become disciplined and write proper commit messages and commit at a proper granularity, you'll see you have some powerful tools at hand to search history, track regressions, managed branches et cetera. It does take a bit getting really used to VCS and reap all the benefits, but it's worth investing time in it.

Yes, I will get it, right now. The idea of building my own versioning system when more powerful, accurate, flexible, etc. systems exist... Felt stupid. My only fear was that it'd overkill. But you guys said what I needed to hear :

If I were starting from nothing, I think I'd consider Mercurial over SVN - it seems less complex than Git and seem a bit more Windows friendly. [...] I'm considering converting my personal SVN repository to Mercurial, and hosting it on https://bitbucket.org/ where you can have free private repositories.  


And...  I'm going to aim for DVCS and will first try Mercurial + TortoiseHg.

basically, All of the points f0dder brought forward, and a few others, completely convinced me to go this way.
Here are these points...

1- Speed and efficiency :

* Fetching the entire Notepad++ Community Release wia Git via my 20mbit ADSL is faster than grabbing fSekrit with subversion on my gigabit LAN. Nuff' said?

* Since dvcs store all files locally in addition to the (optional) remote repository, switching branches or datamining history is lightning fast. With subversion, even on a gigabit lan some operations can be painfully slow.
   

2- "Cleanliness", robustness, reliability :

* Subversion stores it's info in ".svn" folders in each and every subfolder of your project. This is ugly, it means you have to use "svn export" to grab/export a clean subtree, and if you forget to do this and copy subfolders around in your svn-managed project, you can screw things up majorly. Both Hg and Git use a single top-level folder per project.
   
* Even though subversion has metadata scattered in all those .svn folders, you don't have the full project history locally - so if your remote repository goes AWOL, you're screwed. With Hg and Git, your own machine has a full local copy of all history.


3- Useful flexibility

* Subversion doesn't treat branches and tags specially, but just as part of the filesystem. This does, kinda, give you some flexibility, but it's flex you don't need, and it can cause a lot of clutter and fuss if you aren't very disciplined with how you arrange stuff.

* Branches in svn always go to your repository, meaning they're slightly slow operations to perform, they "pollute" the namespace, etc. Thus, with svn, you think a lot before you make a branch, especially on a multi-dev project. With Hg and Git, you can do local "feature branches" to work on without disturbing other people, and merge those to the current working branch before pushing your changes upstream. In other words, YOU have a lot of flexibility on your own machine, without necessarily cluttering things for everybody else. Even on single-dev projects, it's nice being able to take a break from adding a new feature to fix a bug, and then merge it all together.


4- Adaptability, reusability...

And if you stay clear of svn, you won't need to muck around with converting your repositories when you feel like ditching it at some later point

I'm considering converting my personal SVN repository to Mercurial, and hosting it on https://bitbucket.org/  where you can have free private repositories.  If bitbucket ever goes away, that's not a big deal since any workspace I have is essentially a full backup of the repository.  Moving my hosted SVN stuff was a bit of a pain when my 1st hoster dropped their free plans.
Title: Re: DVCS ?
Post by: Armando on February 20, 2011, 11:24 PM
It's a bit long but this part from the Mercurial manual gives interesting info, particularly in relation to this thread. Of course it might be a bit subjective...:) :

1.6.1. Subversion

Subversion is a popular revision control tool, developed to replace CVS. It has a centralised client/server architecture.

Subversion and Mercurial have similarly named commands for performing the same operations, so if you're familiar with one, it is easy to learn to use the other. Both tools are portable to all popular operating systems.

Prior   to   version   1.5,   Subversion   had   no   useful   support   for   merges.   At   the   time   of   writing,   its   merge tracking   capability   is   new,   and   known   to   be   complicated   and   buggy   [http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced.html#svn.branchmerge.advanced.finalword].

Mercurial  has  a  substantial  performance  advantage  over  Subversion  on  every  revision  control  operation  I  have benchmarked.  I  have  measured  its  advantage  as  ranging  from  a  factor  of  two  to  a  factor  of  six  when  compared  with Subversion 1.4.3's ra_local file store, which is the fastest access method available. In more realistic deployments involving a network-based store, Subversion will be at a substantially larger disadvantage. Because many Subversion commands must talk to the server and Subversion does not have useful replication facilities, server capacity and network bandwidth become bottlenecks for modestly large projects. Additionally, Subversion incurs substantial storage overhead to avoid network transactions for a few common operations, such as finding modified files (status) and displaying modifications against the current revision (diff). As a result, a Subversion working copy is often the same size as, or larger than, a Mercurial repository and working directory, even though the Mercurial repository contains a complete history of the project.

Subversion is widely supported by third party tools. Mercurial currently lags considerably in this area. This gap is closing, however, and indeed some of Mercurial's GUI tools now outshine their Subversion equivalents. Like Mercurial, Subversion has an excellent user manual.

Because Subversion doesn't store revision history on the client, it is well suited to managing projects that deal with lots of large, opaque binary files. If you check in fifty revisions to an incompressible 10MB file, Subversion's client-side space usage stays constant The space used by any distributed SCM will grow rapidly in proportion to the number of revisions, because the differences between each revision are large.

In addition, it's often difficult or, more usually, impossible to merge different versions of a binary file. Subversion's ability to let a user lock a file, so that they temporarily have the exclusive right to commit changes to it, can be a significant advantage to a project where binary files are widely used.

Mercurial can import revision history from a Subversion repository. It can also export revision history to a Subversion repository. This makes it easy to “test the waters” and use Mercurial and Subversion in parallel before deciding to switch. History conversion is incremental, so you can perform an initial conversion, then small additional conversions afterwards to bring in new changes.

1.6.2. Git

Git is a distributed revision control tool that was developed for managing the Linux kernel source tree. Like Mercurial, its early design was somewhat influenced by Monotone.

Git has a very large command set, with version 1.5.0 providing 139 individual commands. It has something of a reputation for being difficult to learn. Compared to Git, Mercurial has a strong focus on simplicity.

In terms of performance, Git is extremely fast. In several cases, it is faster than Mercurial, at least on Linux, while Mercurial performs better on other operations. However, on Windows, the performance and general level of support that Git provides is, at the time of writing, far behind that of Mercurial.

While a Mercurial repository needs no maintenance, a Git repository requires frequent manual “repacks” of its metadata. Without these, performance degrades, while space usage grows rapidly. A server that contains many Git repositories that are not rigorously and frequently repacked will become heavily disk-bound during backups, and there have been instances of daily backups taking far longer than 24 hours as a result. A freshly packed Git repository is slightly smaller than a Mercurial repository, but an unpacked repository is several orders of magnitude larger.

The core of Git is written in C. Many Git commands are implemented as shell or Perl scripts, and the quality of these scripts varies widely. I have encountered several instances where scripts charged along blindly in the presence of errors that should have been fatal.

Mercurial can import revision history from a Git repository.
Title: Re: DVCS ?
Post by: Armando on March 02, 2011, 10:06 AM
So, I got into Mercurial and like it. I also subscribed to a bitbucket account, etc. It definitely seems fast, unintrusive and powerful (some little "side effect features" like the  propagation of changes across file copies is quite nice).

Some early "2¢ thoughts":

While the documentation is generally superb, I found that the support concerning the actual organization of repositories not that clear (e.g. : can I create sub-repositories inside a main repository ? should I have one general repository containing all sub-projets ? or should I create a repository for each sub-project and nothing for the encompassing project folder, etc.?). Anyway : I just created a repository for each (sub) project since I didn't find any simple way to manage repositories hierarchies with TortoiseHg. (Speaking of TortoiseHg, I first started learning Mercurial by reading the... Mercurial manual. And I must say that the command line feels more simple than the Tortoise GUI. But who knows... I might change my mind.)

I can also see some "room" for other automatic versioning/backup solutions like AJC backup, autover or File Hamster (in addition to Mercurial). Committing changes is a voluntary action and, knowing myself, I'll obviously forget to commit important changes from time to time.  :) Or am I missing something ?

That's it for now... Thanks for helping me with my choice. Seems like Mercurial was what I was looking  for.
Title: Re: DVCS ?
Post by: Ath on March 02, 2011, 10:16 AM
Committing changes is a voluntary action and, knowing myself, I'll obviously forget to commit important changes from time to time.  :) Or am I missing something ?
That's probably the main reason the icon overlays in Windows Explorer turn red if something has changed locally. You have to take action yourself though, no auto-commit (nor would I want that).

You haven't mentioned the programming environment/IDE you are using for your project. Maybe that has an integration, as most of the big IDE's have it (NetBeans, Eclipse and descendants, Visual Studio). Some of them can even warn you if you try to close without committing your changes.
Title: Re: DVCS ?
Post by: f0dder on March 02, 2011, 10:53 AM
Committing changes is a voluntary action and, knowing myself, I'll obviously forget to commit important changes from time to time.  :) Or am I missing something ?
First, there's no way to really tell when a file modification is done and complete - the best heuristic you could go by is "file has been modified, and now hasn't been additionally modified for n seconds".

Second, you don't want commits based on random modifications - at least when programming, you'll often be doing a related set of changes across a few files, and then commit that. Think of it as not commiting files, but committing features :)
Title: Re: DVCS ?
Post by: mwb1100 on March 02, 2011, 11:10 AM
Committing changes is a voluntary action and, knowing myself, I'll obviously forget to commit important changes from time to time.  :) Or am I missing something ?

One thing that git was able to do (but I'm not sure if Mercurial supports this or not) is collapsing a set of changes at the 'tip' of a branch into a single change.  Git also lets you drop changes that are at the tip (though it's pretty easy to get them back if you do it by accident, since the change isn't really gone, it's just not at the tip anymore).  What these features enable is that you can commit your local changes at will, without too much regard for whether or not they're 'correct'. Until you push the changes, they aren't seen by anyone else, and when you have something you want to push publicly, you can squash (that's the term git uses) the several changes into a single, coherent change, and push that to the public repository.
Title: Re: DVCS ?
Post by: f0dder on March 02, 2011, 11:18 AM
mwb1100: I believe Mercurial has (limited) supported for that stuff as well - Git goes all the way and lets you shoot off your legs by allowing heavy history modification... the kind that's nifty to have, but will make people want to rip out your guts if you ever perform it on world-pushed history :)
Title: Re: DVCS ?
Post by: Armando on March 02, 2011, 11:33 AM
That's probably the main reason the icon overlays in Windows Explorer turn red if something has changed locally. You have to take action yourself though, no auto-commit (nor would I want that).

You haven't mentioned the programming environment/IDE you are using for your project. Maybe that has an integration, as most of the big IDE's have it (NetBeans, Eclipse and descendants, Visual Studio). Some of them can even warn you if you try to close without committing your changes.


Yes, the icon overlay is a nice addition. I'll see if that's enough. I could also just put all my code in Dropbox. Currently I use the free autover.

As far as the IDE is concerned, I'm now working on a VB project. The defunctish VB6, to be precise.

So there's "nothing" for that, AFAIK. Well... there's VSS 6 but... After reading Visual SourceSafe: Microsoft's Source Destruction System (http://www.highprogrammer.com/alan/windev/sourcesafe.html) and Visual SourceSafe Version Control: Unsafe at any Speed? (http://www.developsense.com/testing/VSSDefects.html), I chickened out (old articles, but relevant to the available VSS version...).

For Java projects I'll use Eclipse and, yes, I saw plug-ins/add-ons... But I haven't looked closely as this is not what I'm currently working with.

First, there's no way to really tell when a file modification is done and complete - the best heuristic you could go by is "file has been modified, and now hasn't been additionally modified for n seconds".

Second, you don't want commits based on random modifications - at least when programming, you'll often be doing a related set of changes across a few files, and then commit that. Think of it as not commiting files, but committing features :)

You are absolutely right : committing isn't about saving random set of changes. What I hypothetically had in mind was a separate branch for automated versioning (which could of course be merged with the "manual" branch... Not that it would have to, but could) -- e.g. each version of that branch would correspond to a "save". However, it's a non-existent solution and I can see why this would not be such a great idea (in terms of clarity, mostly). Using the available solution (i.e. : a separate software to do the arbitrary "versioning" part) seems like the best solution anyway.


One thing that git was able to do (but I'm not sure if Mercurial supports this or not) is collapsing a set of changes at the 'tip' of a branch into a single change.  Git also lets you drop changes that are at the tip (though it's pretty easy to get them back if you do it by accident, since the change isn't really gone, it's just not at the tip anymore).  What these features enable is that you can commit your local changes at will, without too much regard for whether or not they're 'correct'. Until you push the changes, they aren't seen by anyone else, and when you have something you want to push publicly, you can squash (that's the term git uses) the several changes into a single, coherent change, and push that to the public repository.

Thanks for the heads up ! I just looked and there's a mercurial extension that does exactly the same thing : CollapseExtension (http://mercurial.selenic.com/wiki/CollapseExtension). And there's a lengthier solution (no extension) described there : Concatenating multiple changesets into one (http://mercurial.selenic.com/wiki/ConcatenatingChangesets) . Alternatively, there's also this : Rebase Project (http://mercurial.selenic.com/wiki/RebaseProject) .

The collapse extension sounds useful :

Usage Patterns

This extension is particularly useful when you follow the practice of committing regularly to your local repository, possibly before you've got anything sufficiently complete to be put in a shared repository. Rather than filling the changelog with changes of the "OK it almost works now" type, you can collapse all of your intermediate commits before pushing to the shared repository.

N.B. 'hg collapse' is destructive; it rewrites history. Therefore you should never collapse any changeset that has been pushed to another repository, unless you really know what you are doing.
-http://mercurial.selenic.com/wiki/CollapseExtension

I'll keep digging... But I'll also eventually have to start coding.  ;D
Title: Re: DVCS ?
Post by: Renegade on March 02, 2011, 08:52 PM
Which integrates best with Visual Studio?
Title: Re: DVCS ?
Post by: Armando on March 02, 2011, 10:15 PM
You can look around, but from what I read in the last few days, it seems that VisualHG which sits on top of TortoiseHg would be the way to go. So you basically install TortoiseHg (http://tortoisehg.bitbucket.org/) (usually bundled with the latest stable Mercurial), and then you install VisualHG (http://visualhg.codeplex.com/).

A few links... but there are many others.
http://www.eworldui.net/blog/post/2010/03/15/VisualHG-A-Mercurial-Plugin-for-Visual-Studio.aspx
http://kiln.stackexchange.com/questions/1103/what-are-the-pros-and-cons-of-visualhg-vs-hgsccpackage
Title: Re: DVCS ?
Post by: Armando on March 03, 2011, 01:45 PM
In relation to what f0dder said...

First, there's no way to really tell when a file modification is done and complete - the best heuristic you could go by is "file has been modified, and now hasn't been additionally modified for n seconds".

Second, you don't want commits based on random modifications - at least when programming, you'll often be doing a related set of changes across a few files, and then commit that. Think of it as not commiting files, but committing features :)

"Auto-committing" isn't the way to go... But an option/feature in Tortoise to just popup a reminder after n file modifications in a specific timeframe would definitely be useful, especially since it can't integrate with all IDE (or whatever) out there.

Wouldn't that be a sound feature request ? Would you use it ?
Title: Re: DVCS ?
Post by: Ath on March 03, 2011, 02:01 PM
Wouldn't that be a sound feature request ? Would you use it ?
Nope, some language/tools/developers using vcs controlled source induce so many changes, that can be relatively unimportant, but need to be checked in at one moment, while in another environment, a single line changed can make a world of difference that needs to be committed at once. So change-counting doesn't count :P
Title: Re: DVCS ?
Post by: Armando on March 03, 2011, 08:18 PM
Nope, some language/tools/developers using vcs controlled source induce so many changes, that can be relatively unimportant, but need to be checked in at one moment, while in another environment, a single line changed can make a world of difference that needs to be committed at once. So change-counting doesn't count :P

Sure, in a way change-counting doesn't... count. But in my relative and very imperfect world, it does.

And why couldn't one adjust the parameters depending on the project ? (A simple backup comparison: some backups need to be real time or performed every few min, but others can be performed monthly.)

I understand perfectly well why one would never want to commit randomly. However, I'd vastly prefer to be slightly annoyed by a pop-up from time to time, than potentially loose several hours of work, or simply find myself committing a huge chunk of code that should've been split in smaller part... because I forgot to commit my work.  :)

Of course I could then rely on autover, AJC or File Hamster. But... Far from ideal.

---

On another note : I wish I could rely on the icon overlay... But they are slightly unreliable here. They change only on F5, and sometimes they don't. I have to open/close the repo/folder for them to update.
Title: Re: DVCS ?
Post by: Ath on March 04, 2011, 01:31 AM
They change only on F5, and sometimes they don't. I have to open/close the repo/folder for them to update.
That's related to 2 things: Settings in the TortoiseXX tooling (Check out 'Icon overlays'), and the sometimes flaky icon-cache of Windows (including Win7)
Title: Re: DVCS ?
Post by: Armando on March 04, 2011, 09:42 AM
Thanks.
I read a few things about overlays,  but nothing seemed to really apply. I turned ON the "Local Disks Only" setting and see if it helps. (Explorer extension settings --> icons)
Title: Re: DVCS ?
Post by: Armando on March 04, 2011, 03:19 PM
Hmmmm. I probably shouldn't but I'm currently looking at Git. Who's working with Git here ? Are there reasons why you chose it over Mercurial or Bazaar ?

(Moving a function from one file to another and Git can tell you the history of that single function across the move... ? Really ? Sounds appealing. I guess this is where content tracking (instead of file tracking) shines.)
Title: Re: DVCS ?
Post by: f0dder on March 04, 2011, 03:28 PM
I've settled on Git for moving fSekrit forwards, but that's mainly because of Git's "blow off your legs" power with regards to history rewriting - I want to make the codebase public, but retain no memory in the public codebase from the non-public versions. Yet, at the same time, I want the private repository to have FULL history, and do that without committing future versions to both public and private repositories. Git supports that (even if I haven't worked out the details of how to set it up 100% :)).

History of a single function that moves? Interesting. That's not something inherent in how git stores the version history, though, unless I've missed something - Git stores the full version of each file for each commit, whereas both subversion and Mercurial store changesets (iirc Mercurial also stores a full-version "every once in a while" so moving between versions doesn't become too slow). But IOW, if Git can do it, it's gotta be history analyzing magic smartness that could potentially be done by everybody else too?

From what I've seen from various comparisons, Git and Mercurial offer most of the same features, as long as you don't need the über-wicked geek functionality (Mercurial pretty much won't let you blow your legs off). Also seems like there's not massive speed differences for "normal" size projects.

Git seems a bit more down and dirty, and the tortoise version still isn't as polished as the tortoise versions of other version control systems... it still shows a bit that Git was originally a whole bunch of shell scripts, instead of designing it "properly" as a C/C++ library with a "proper" front-end :)
Title: Re: DVCS ?
Post by: Ath on March 04, 2011, 03:30 PM
I probably shouldn't but I'm currently looking at Git.
Oh yes, you should, if you have the time, resources and interest in it.
Making a more educated choice now (early/pre-start) is way better than to change half way through your project, if you then discover a feature in the other solution you absolutely must have, for whatever reason.
Title: Re: DVCS ?
Post by: housetier on March 04, 2011, 04:12 PM
I use git with great success, but it does have drawbacks, namely poor support for Windows platform.

It is very fast even with large repositories.

AFAIK mercurial has much wider platform support than git, but is also rather slow. This is from hearsay though.

I chose git at that time because it was the new shit.
Title: Re: DVCS ?
Post by: Shades on March 04, 2011, 04:50 PM
The 'portable Git preview' software (for Windows) you can get from softpedia looks to be very promising.


And together with SmartGit (http://www.syntevo.com/smartgit/index.html) (free for personal use) it starts to look quite nice as well.

One hell of lot better than WinCVS at least  ;)

**EDIT
Added the SmartGit part.
Title: Re: DVCS ?
Post by: Armando on March 04, 2011, 10:07 PM
I've settled on Git for moving fSekrit forwards, but that's mainly because of Git's "blow off your legs" power with regards to history rewriting - I want to make the codebase public, but retain no memory in the public codebase from the non-public versions. Yet, at the same time, I want the private repository to have FULL history, and do that without committing future versions to both public and private repositories. Git supports that (even if I haven't worked out the details of how to set it up 100% :)).

One question : You'll still be able to commit code from the private to the public repo even if you squashed the changesets/history in the public one ??? I most probably don't understand properly as I'm not sure how that would work.

In any case, I've edited Mercurial's ini file to add the "collapse" extension and it seems to load properly. Haven't properly tested it yet. Collapsing changesets is probably not too dangerous when working alone, but I don't know about team work. Potential for disaster.

History of a single function that moves? Interesting. That's not something inherent in how git stores the version history, though, unless I've missed something - Git stores the full version of each file for each commit, whereas both subversion and Mercurial store changesets (iirc Mercurial also stores a full-version "every once in a while" so moving between versions doesn't become too slow). But IOW, if Git can do it, it's gotta be history analyzing magic smartness that could potentially be done by everybody else too?

That's what I read on stackoverflow. Don't take my word for it! I'm going to try to find out more info on that.

From what I've seen from various comparisons, Git and Mercurial offer most of the same features, as long as you don't need the über-wicked geek functionality (Mercurial pretty much won't let you blow your legs off). Also seems like there's not massive speed differences for "normal" size projects.

I've seen a number of benchmarks. AFAICT, it varies depending on the task, OS, etc. so it's hard to say. In any case, I'd say that when working locally, we're talking about less than a second. Bazaar has some nice benchmarks numbers on its page, but... I haven't found the same results anywhere else.

Git seems a bit more down and dirty, and the tortoise version still isn't as polished as the tortoise versions of other version control systems... it still shows a bit that Git was originally a whole bunch of shell scripts, instead of designing it "properly" as a C/C++ library with a "proper" front-end :)

I just looked at smartGit and it looks really nice. I'll see if I can play with it during the weekend.


I probably shouldn't but I'm currently looking at Git.
Oh yes, you should, if you have the time, resources and interest in it.
Making a more educated choice now (early/pre-start) is way better than to change half way through your project, if you then discover a feature in the other solution you absolutely must have, for whatever reason.

Thanks for the encouragement. I just have to be careful to not spend too much time obsessing about details -- something I'm pretty good at.  :)  But you're probably right. That's why I'll check out the Git option bit more carefully.


I use git with great success, but it does have drawbacks, namely poor support for Windows platform.

It is very fast even with large repositories.

AFAIK mercurial has much wider platform support than git, but is also rather slow. This is from hearsay though.

I chose git at that time because it was the new shit.

Eheh...
Git effectively seems a bit speedier. But, concretely, I'm not sure if I'd be able to see the difference in my everyday work.

The 'portable Git preview' software (for Windows) you can get from softpedia looks to be very promising.


And together with SmartGit (http://www.syntevo.com/smartgit/index.html) (free for personal use) it starts to look quite nice as well.

One hell of lot better than WinCVS at least  ;)

**EDIT
Added the SmartGit part.

Thanks Shades. I downloaded both. Will report back.
Title: Re: DVCS ?
Post by: f0dder on March 05, 2011, 05:23 AM
One question : You'll still be able to commit code from the private to the public repo even if you squashed the changesets/history in the public one ??? I most probably don't understand properly as I'm not sure how that would work.
Well, I'm still not 100% on how it works under the hood, but the idea is that after "going public", you don't touch the old private repo, you keep doing all new development in the public one, and the private is kept just for the history - but is able to show entire history.

In any case, I've edited Mercurial's ini file to add the "collapse" extension and it seems to load properly. Haven't properly tested it yet. Collapsing changesets is probably not too dangerous when working alone, but I don't know about team work. Potential for disaster.
As long as you don't collapse changesets that have already been pushed, you should be fine - so do all your crazy-small local commits, collapse changesets to your liking, then push remotely and you should be fine :)
Title: Re: DVCS ?
Post by: Deozaan on March 07, 2011, 03:09 PM
Don't forget a nice way to get started with Hg is from http://hginit.com/

I personally use Hg (and http://BitBucket.org/) and I, too, found it easier to use the command line than TortoiseHg.
Title: Re: DVCS ?
Post by: Armando on March 08, 2011, 03:07 AM
@f0dder : Thanks for the explanations.
@Everyone here : I read a lot and have been playing with Git and Mercurial quite a bit in the last 2 days.


A-   Intro

It looks formal, but it's not. (I don't have enough time to "formalize" as much as I'd like to...)
It's only... There's a lot of info that I'd like to share. I'll split it in a few parts and today I'll talk about less technical aspects.

Wow... amazing how much false or half true infos on Git and Mercurial you’ll find out there! Even Google’s analysis (http://code.google.com/p/support/wiki/DVCSAnalysis), while still very good, seems a bit inaccurate. "They" favoured Mercurial over Git, but without even detailing some of their biggest differences -- e.g. : the important repercussions Git's index has on the way some features are implemented... but more about that later. Basically, a lot of the articles are just repetitions of what has been said on various blogs all over the Web, without even trying to do a bit of research. Fortunately there are also excellent books and resources out there (like the official manuals…).

So, what about Git? I must say I’m thoroughly impressed. The question remains though : should I use Git or Mercurial ? Which one is better for my needs? Still hard to say.


B-   Experiments

I've tried all kinds of things, with both Mercurial and Git. Like merging branches and collapsing changesets and other stuff (git rebase -i HEAD~n , hg collapse –r  n:m … The hg collapse is actually a bit slicker, I find, than the rebase interactive, etc. ) with some success. I can see that one or the other will work well, providing I'm not blindingly committing and editing stuff. Who would do that anyway.

However, while they are certainly quite similar, they of course have some pretty interesting differences. And those differences make them both attractive in their own way.


a.   The general Feel... going from Git to Hg, and Hg to Git

Switching between Mercurial and git, some commands can become confusing : Mercurials Pull and Fetch do exactly the reverse of Git's Pull and Fetch ! Careful there...  :)

The Mercurial document (http://mercurial.selenic.com/wiki/GitConcepts) about Mercurial/Git's differences is usually accurate (of course, it doesn't talk about a few things... like files renaming, intelligent "blame"… but more about that later) but it can be misleading as some features aren’t implemented exactly in the same way and just don’t have the same options.

Some programmers — like Steve Losh - stress how each system feel very different to use (and how that's very important...) :

Each git command is like a Swiss Army knife. For example, git checkout can switch the working directory to a new branch, update file contents to that of a previous revision, and even create a new branch. It’s an efficient way to work once you learn all the arguments and how they interact with each other.

Mercurial is like a well-equipped kitchen — it has a lot of tools that each do one simple, well-defined thing, and do it well. To switch the working directory you use hg update. To update file contents to what they were at a previous revision you use hg revert. To create a new branch you use hg branch. This means there are more commands to learn, but each command is much simpler and more specific to a single conceptual task.
- http://stevelosh.com/blog/2010/01/the-real-difference-between-mercurial-and-git/

I think I generally agree (of course, as you probably guessed, Mr Losh prefers Mercurial... well… at the time he wrote the article). Generally speaking, and there's nothing new there : “Git is considered to have a steeper learning curve than Mercurial due to a number of factors. Git has more commands and options, the volume of which can be intimidating to new users”, as Mr Google puts it.


b.   Performance ?

On the performance side, both are fast.

Relatively speaking though, Git is certainly not always fast. In fact, in 2009, it lost a few benchmark “battles” (note that it could different today — numbers change all the time as the software evolve) :

1 As a benchmark, Git and Mercurial repositories were seeded with approximately 1500 files totaling 35 M of data. The servers were running in Chicago and the clients in Mountain View (51 ms ping time). The operation of cloning the remote repository (similar to a initial checkout in traditional version control systems) averaged 8.1 seconds for Mercurial and 178 seconds for Git (22 times slower). A single file in the repository was then changed 50 times and the clients pulled the updates. In this case, Mercurial took 1.5 seconds and Git required 18 seconds (12 times slower). When the Git protocol was used instead of HTTP, Git's performance was similar to Mercurial (8.7 seconds for cloning, 2.8 seconds for the pull).
-http://code.google.com/p/support/wiki/DVCSAnalysis

Even Git’s repo’s size variations can be aproblem. All and all, on Linux, Mercurial seem to produce more stable repositories size and is really speedy. Which seems to confirm Google’s conclusions. See : http://draketo.de/proj/hg-vs-git-server/test-results.html

---

Now, what about windows usage/performance per se… There are not that many recent numbers that I found. But Git made significant progresses in the last 2 years, implementing smart HTTP support (Mercurial vs Git; it’s all in the branches (http://felipec.wordpress.com/2011/01/16/mercurial-vs-git-its-all-in-the-branches/)) to solve some of the speed problem. On the windows GUI side, it’s the same thing : a lot of different and good options for Git.


Anyway... Generally speaking, both are fast (many other benchmarks can be found to prove that) and what needs to be remembered here is that Mercurial is most probably not less efficient than Git. If anything, it’s at least probably more efficient for certain tasks.


c.   GUIs...

Like I just said, there are many GUIs for Git. SmartGit (http://www.syntevo.com/smartgit/index.html), which Shades suggested earlier is really really nice. Nicer than TortoiseGit IMO, but not free if you use commercially.

TortoiseGit (http://code.google.com/p/tortoisegit/) is also a great Gui. I actually found it as polished as TortoiseHG (used it only for 2 days so your mileage may vary). It looks slicker : the icons are nicer, the chosen fonts too, etc. (IMO) and a lot can be done directly from its interface. However, I found that the buttons/commands to show the main interface component/windows are hard to find at first. This is something that’s much clearer with TortoiseHG.

And then there are others like Git Extensions, which are very nice too, not to mention the ones which are bundled with Windows Git by default : Gitk, Git GUI.

For Mercurial, as you guessed, the best is certainly TortoiseHG (http://tortoisehg.bitbucket.org/). But there are lots of other options and/or IDE add-ons. See : http://mercurial.selenic.com/wiki/OtherTools

Now… whatever the Gui, you'll still have to drop to the command line once a while to access some of the "not yet GUIified" commands. Git is complex and powerful and so is Hg... especially with all the extensions.

Parenthesis : As Deozan mentioned, it’s often easier to just learn the commands and use the command line. One of the problem these GUIs have is that they aren’t always following exactly the same “command line terminology”, which can be confusing. Instead, they’ll use more high level metaphors (e.g. : “stage” instead of “git add” or simply “add” — this refers to the git’s “staging” of data in the index before committing).


OK... enough for tonight. Tomorrow, hopefully, I'll tackle Git’s Index, File rename , Code/txt move detection, Branching, and maybe Merging. And next... We'll see.  Maybe tags, revision numbers, or Expendability and collaboration tools... :)
Title: Re: DVCS ?
Post by: f0dder on March 08, 2011, 03:53 AM
Armando: nice post - DoCoCoins coming your way. More, please! :)

On speed: first, you have to do some manual cleanup of Git repositories every once in a while, to do garbage collection and (re)pack the repository - this helps wrt. speed and disk space consumption. This can of course be automated, but it's something you have to automate, Git doesn't do it for you.

Also, there's definitely been a lot of progress in Git over the years. Considering that more and more has been going from shell scripts -> native C code, it's probably not fair looking at a 2 years old benchmark :)



On Tortoise... I've been considering moving away from it. Yes, the icon overlays in explorer are kinda nice, but that's about it - I feel that a dedicated app would probably provide more efficient workflows. Also, having cache processes for t-svn, t-git, t-hg seems a bit much, and I often run into problems with those processes keeping folders locked when they shouldn't.

Dunno which app(s), though - I wasn't all impressed when I checked out SmartGit, but can't remember exactly why, guess I'll give it another chance. I think my 'meh' was partially causes by the program being implemented in Java, and (worse) not having an option to use the system JDK but installing it's own separate copy.
Title: Re: DVCS ?
Post by: Armando on March 08, 2011, 10:50 AM
Armando: nice post - DoCoCoins coming your way. More, please! :)

On speed: first, you have to do some manual cleanup of Git repositories every once in a while, to do garbage collection and (re)pack the repository - this helps wrt. speed and disk space consumption. This can of course be automated, but it's something you have to automate, Git doesn't do it for you.

Thanks f0dder. I appreciate.

Yes, thanks for reminding me of git gc -- I wasn't going to touch that area, but now I should.  :)

There are lots of posts and paragraphs in articles everywhere mentioning the need to "git gc" (with various flags...) to keep the repository in good shape. The git-gc(1) Manual Page (http://www.kernel.org/pub/software/scm/git/docs/git-gc.html) states it pretty clearly :

"Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance."

However, there's also this part :

Some git commands may automatically run git gc; see the --auto flag below for details.


From what I've read (manual, online books), the need to repack and call git gc is much less significant with newer Git releases as many of the commands that cause the repository to grow automatically run git gc for you.

From Pro Git (http://progit.org/book/it/ch9-7.html) (one of the best reference out there):

Occasionally, Git automatically runs a command called “auto gc”. Most of the time, this command does nothing. However, if there are too many loose objects (objects not in a packfile) or too many packfiles, Git launches a full-fledged git gc command. The gc  stands for garbage collect, and the command does a number of things: it gathers up all the loose objects and places them in packfiles, it consolidates packfiles into one big packfile, and it removes objects that aren’t reachable from any commit and are a few months old.

You can run auto gc manually as follows:


$ git gc --auto


Again, this generally does nothing. You must have around 7,000 loose objects or more than 50 packfiles for Git to fire up a real gc command. You can modify these limits with the gc.auto and gc.autopacklimit config settings, respectively.

Which commands run git gc automatically ? Someone did a git grep -- --auto on stackoverflow (http://stackoverflow.com/questions/5137447/list-of-all-commands-that-cause-git-gc-auto). He writes :


builtin/merge.c:            const char *argv_gc_auto[] = { "gc", "--auto", NULL };
builtin/receive-pack.c:     "gc", "--auto", "--quiet", NULL,
git-am.sh:                  git gc --auto
git-rebase--interactive.sh: git gc --auto &&
git-svn.perl:               command_noisy('gc', '--auto');


From git grep -- --auto on git.git, those results looked interesting. The notable one is builtin/merge.c meaning that the ever so common git pull should trigger a git gc --auto.

Additionally, unless your 'non-technical' staff is doing rather 'advanced' stuff (at which point they wouldn't be 'non-technical' anymore), I don't see why they would ever need to run git gc manually instead of just letting git gc --auto handle everything.

Now, you're right. Maybe once in a while, especially for big repos and server stuff, a git gc might be a good idea. But I don't see it as anything urgent and absolutely necessary.

--

The conclusion of this very recent (2011-01-25) benchmark (http://draketo.de/proj/hg-vs-git-server/test-results.html) (link also provided in my previous post) is quite interesting :

If you need the fastest system and don’t mind occassional performance glitches and volatile repository sizes, git is the way to go. Note that its speed drops to half the speed of Mercurial (and less for big repositories, since the time for the garbage collection rises linearly) if Git is forced to avoid frequently growing and shrinking repositories by running the garbage collection every ten commits. Also note that git gc --auto allowed the repository to grow to more than 5 times the minimum size and that garbage collection created 100% load for 3 of my 4 cores which would slow down all other processes on a server, too (otherwise gc would likely have been slower by factor 3).

If you need reliable performance and space requirements, Mercurial is the better choice, especially when called directly via its API. Also for small repositories with up to about 200 commits, it is faster than git even without garbage collection.
...  :)

Also, there's definitely been a lot of progress in Git over the years. Considering that more and more has been going from shell scripts -> native C code, it's probably not fair looking at a 2 years old benchmark :)

You're absolutely right. The tests mentioned above are the most recent I could find, but there are not many.

On Tortoise... I've been considering moving away from it. Yes, the icon overlays in explorer are kinda nice, but that's about it - I feel that a dedicated app would probably provide more efficient workflows. Also, having cache processes for t-svn, t-git, t-hg seems a bit much, and I often run into problems with those processes keeping folders locked when they shouldn't.

Dunno which app(s), though - I wasn't all impressed when I checked out SmartGit, but can't remember exactly why, guess I'll give it another chance. I think my 'meh' was partially causes by the program being implemented in Java, and (worse) not having an option to use the system JDK but installing it's own separate copy.

I find that all these GUIs have limitations. And, yes, having all these tortoise running at the same might cause some caching problem. Although I've read that they're now supposed to play well together (speaking of the icons overlay here).

I don't care about the overlay anymore as it's a bit unreliable. I mostly use the "tortoise explorer" on TortoiseHG an the "log" and "commit" windows/dialogs  in TortoiseGit. I use the command line git status or hg status to find out what's up with the changes.  :)

Now... SmartGit as a dedicated app definitely seems the most viable, and it's performing quite well. I haven't had any problem (yet) with it. You just need to get use to the UI a bit and you should be okay. It might be implemented in Java, but, honestly, it's not apparent and its performance is quite good.

-----

More later... But maybe tomorrow as I'm running out of time, even if the subject is highly interesting.

[Edited : formatted code a bit...]
[Edited :grrrr. Font problems..]
Title: Re: DVCS ?
Post by: f0dder on March 08, 2011, 11:02 AM
Interesting notes on performance!

I find that all these GUIs have limitations. And, yes, having all these tortoise running at the same might cause some caching problem. Although I've read that they're now supposed to play well together (speaking of the icons overlay here).
Oh, the problems I've had are there even with a single Tortoise flavor installed - dunno if it "stacks up" when there's multiple versions. Happens relatively rarely, but enough that it's a minor annoyance.
Title: Re: DVCS ?
Post by: Armando on March 14, 2011, 08:43 PM
More on GUIs.

I could edit my previous post, but I’m sure nobody would notice.  :)

After spending many hours fiddling with Git and Hg, TortoiseHg, SmartGit, TortoiseGit and “Git Extensions”, etc. I came to the conclusion that Hg/git GUIs are ok but… somewhat disappointing.

- Most are percetly fine for basic operations and still very convenient, but for more complex operations (e.g. : git rebase –i HEAD~n), the command line is still better and more transparent. You’re much more sure about what’s happening, you can actually “see” it.

[- And as f0dder will later say : they feel rough around the edge (questionable interface choices and aesthetics...), not always super responsive, etc.]
Title: Re: DVCS ?
Post by: Armando on March 14, 2011, 08:51 PM
d.   Hg vs Git — GUI support

What about Hg vs Git, in terms of GUI support ?
Well, even though Hg (Mercurial) as such is extremely well supported on Windows, there are a bit less choices than Git in terms of GUIs and, ironically, its “almost default” GUI (hgk Extension) doesn’t even work by default on windows !

 i.   Hg… more about it.

For Hg GUIs one can look at http://mercurial.selenic.com/wiki/OtherTools. Many are outdated and their development has either stopped (e.g. : Push Me Pull You, hgct, CuteHg) or slowed down (e.g. : hgview)

     1.   Hgk

Like I just said, I first wasn’t able to use the Hgk Extension (hg view), the graph log viewer + basic GUI functionalities which now comes “by default” with Hg.  Mercurial complained and I had to take more than 30 min to find a proper solution. The terrible instructions on the official page (http://mercurial.selenic.com/wiki/HgkExtension) didn’t work. Messy stuff… :) Then I found these instructions (http://blog.davidpcaldwell.com/2010/10/easier-way-to-run-mercurial-hgk-or-hg.html) (thanks Mr David P. Caldwell) and I finally got it to work.

I used it a few times and it’s good if you like the command line and only want to have a graph log and other easily accessible info describing where you’re at in terms of commit, etc... So I tested a few other more sophisticated GUIs… The 2 I looked at in more details are TortoiseHg the more “fringy” one HgWin (which BTW is one of the few actively developed) .

     2.   HgWin

HgWin, is now on v1.4.1 since yesterday. It can be used through visual studio or the command line (e.g. : “hgwin log” shows the graph log, etc.). It  looks clean enough and there are more an more features added to it with every new version (i.e. : (more Hg commands implemented).

Features :
•   Support for operations: Commit, Revert, Resolve, Compare, Update, Tags, Push, Pull, Incoming, Outgoing, Merge, Clone, Bundle, Archive, Annotate (Blame), View File, Grep, Bookmarks, Rebase
•   File history dialog with support of file differencing
•   Support tracking of file renames in file history dialog
•   Support external file comparison tools
•   Revisions graph log. This feature is similar to hgk, hgview and tortoiseHg change log window
•   Support for merging revisions
•   Support for rebasing revisions
•   Support for inline file difference in most of package windows
•   Support for bookmarks
-http://www.newsupaplex.pp.ru/hgwin_news_eng.html

Like I said, the developer also makes a visual studio plugin which IMO seems fine enough for most basic operations (but doesn’t support some more advanced features or extensions like Mercurial Queues or Collapse). http://www.newsupaplex.pp.ru/hgscc_news_eng.html.

I found the UI a bit sluggish at times but it gets the job done. The hgwin log command brings up the main log window which can be used to access most of the other features. The “hgwin” command  just brings up a summary of all  commands.

I won't use it much though as for Hg, I prefer TortoiseHg


     3.   TortoiseHg


TortoiseHg is "better" : more polished, more flexible and has more features…  and I won’t go through them as it’s a much  more familiar interface. You have the icons overlay,  it does all basic options well and you can easily add extensions using its interface. It also has a set of command line options (http://tortoisehg.bitbucket.org/manual/1.0/quick.html) if you don't want to leave the command line. :)


However, I must say that both Tortoise AND HgWin have a not so great keyboard support. I’m very sensitive to that and it annoys me when developers don’t add any shortcuts to access menus, buttons, etc. :)

This will allow for a nice transition to Git GUIs… As for some mysterious reason, not only are Git GUIs generally better, but keyboard support is better in all of them. No idea why.
Title: Re: DVCS ?
Post by: Armando on March 15, 2011, 12:26 AM
ii.   Git… GUIs

Now… What about these Guis…? Here are 4 very short and very imperfect reviews of what seem the most popular ones on Windows.

Don't know if it'll be useful to anybody, but here are some thoughts…

 1.   Git GUI (http://nathanj.github.com/gitguide/tour.html)

This is what could be called the "default" Git GUI. it can be accessed through the command line : "Git gui"

It does come by default when you download Git for Windows. As far as this default is concerned, it's MUCH better than the “default” Hg one I mentioned in my last post about Hg (Mercurial) GUIs.

“Git GUI” is very “late 90s Linux like” : a bit ugly but relatively functional. It does what it does pretty well and can even easily do stuff that you can’t do as easily/intuitively (or even at all...) with other programs (e.g. : TortoiseGit). E.g. : “staging/commiting a few lines at a time instead of whole file changed/diff content, (aka hunk) — so you can split a big commit into several smaller ones (note that in real life using this feature this can be tricky as you won’t have necessarily tested these fractioned commits…).

Like TortoiseGit, Git GUI adds an explorer shell extensions to the mix (i.e. : explorer context menu items) : Git Commit, Git Branch, Git History, Git Bash, etc. Those can be pretty handy when you’re browsing your repo and don’t want to type a command just to add a few files or commit a small change.

Keyboard navigation is okay, not great. Certainly better than TortoiseHG though.

I did run into some problems (errors) when I tried to stash (not stage -- different thing) some changes — maybe was it a one time glitch?

While not beautiful, the graph logs looks nicer than TortoiseGit’s one… subjective I guess.

Overall, I kinda like the "no frills" Git GUI. "Rough around the edges" (2011 03 15 -- 10 46 : see f0dder comment, later), but simple and effective for most important Git commands. :)


   2.   SmartGit (http://www.syntevo.com/smartgit/index.html)

SmartGit, an “easy on the eyes” and comfortable to configure commercial solution, which I mentioned in an earlier post, isn’t *that* great after all.  Well… Ok it IS… pretty good. Probably the best feel overall. There’s certainly nothing equivalent for Hg and the other Git solutions don’t look as polished. It doesn't have the rough and unfinished feel to it.

In SmartGit, most Git commands are achieved quickly and intuitively. Great.

It has all of the most important commands one will need to use Git on a day to day basis. Plus it does a few more advanced things, like edit the Git index and manage sub-modules. Nice.

It does miss some other important ones though, like “blame”, “stash”, “clone –bare” (last one : surprising, to say the least… Unless I missed something [I did miss the "stash" command which was very obvious  :-[ ] ).

Keyboard usage/navigation (shortcuts, “configurability”…) is very good too. Not perfect maybe, but better than all other solutions as it’s configurable (the log view and main/review views offer a “customize” dialog through the "edit" menu, which allows the user to add/edit shortcut keys).

A few maybe insignificant other things I also like about SmartGit: 1- the nice, clean and flexible interface (did I already say it?), 2- the easy well organized and “intuitive” configuration dialog (e.g. : out the box github config — plus a few others source code hosting web solutions like Unfuddle and Codebase —, + other very intuitive Git configuration) 3- and little details like the fact that it refreshes its interface automatically when changes are made to the repos (no need to refresh to see what new content you’d need to commit), a nice custom merge and diff tool, etc.

Are these are good enough reasons to keep it for my everyday work ? No sure yet.

I did encounter a few problems and solving these problems meant dropping to the command line. E.g. : how do you "correct" a rebase that’s stalled… and won't abort nor continue ? hmmmm...  8)

Were these problems due to the fact that some commands/actions aren’t transparent enough in terms of their effect and the parameters used (e.g. : rebasing… Still confusing… Much more than just using the command line IMO) and so I did some really stupid things? Maybe. Or is it because I was using 2 GUIs at once ? Not sure.

The manual is ok, but not as clear as Tortoise’s, IMHO. Very dry, almost no graphs… and so it remains slightly abstract. I’d almost rather read Git’s man pages (not bad at all btw). I hope they’re going to rework the manual a bit.

That said, I’ll keep an eye on it’s development… and maybe even use it. It’s the most promising solution IMO.

What I’d love SmartGit to integrate in future releases (apart from "blame", "stash", "bisect", etc. support) is :

1- some kind of optional “console like” textual feedback, some commands log view, like the one Git extensions provides (see #4). That would be good (maybe is that a secretly available option but… I didn’t find it).

2- an explorer shell extension.

Note : if you don't use it commercially, SmartGit is free.


  3.   TortoiseGit (http://code.google.com/p/tortoisegit/)

TortoiseGit is good, but not perfect either... The UI feels a bit scattered and it's certainly not as sexy as SmartGit, but it seems to offer slightly more options overall (bisect, patch creation, blame, stash, etc.) -- however it misses an important one (in relation to the Git index) : staging, which the basic Git GUI do nicely. And, well, it’s got the famous icons overlay. :) (Not that useful, but still nice to have — I did notice though that it can slow down folder navigation to a crawl… I solved that by killing/restarting the icon cache process)

Detail : I think I found the Tortoise rebasing Gui slightly more intuitive than SmartGit's. But there are other (minor) annoyances, like the ugly graph log.

Performance is "ok" (e.g. : quicker than Git Extensions — see below). Plus, the manual is pretty good (a bit better than SmarGit like I said).

But… I did run into problems using it too. E.g. : when I tried cloning a repo to a bare one, I got an “Unsolvable error”… which I fortunately resolved easily through the command line.

Keyboard usage/navigation (shortcuts, “configurability”…) isn’t that bad either. Not perfect, MUCH better than TortoiseHg (not hard to do)…  But not as Good as SmartGit. I wish I could easily reconfigure the shortcuts to my liking.

“Transparency of action” isn’t great : same “criticism” as SmartGit : some optional pedagogical console-like textual feedback about commands and their options would be good.

A good free overall solution with a few weird things here and there.


  4.   Git Extensions (http://code.google.com/p/gitextensions/)

While it looks unfinished (e.g. : many missing icons in the menus), Git Extensions is still pretty nice and in active development. It also integrates with Visual Studio.

What I like the most about it is its mixture of relative completeness and friendliness : it implements a lot of Git commands in an understandable format.

I haven’t done a feature for feature comparison, but it also seems that there are even more implemented Git commands than in TortoiseGit or SmartGit. It really allows the user to do pretty advanced operations right from the user interface (like bisect, stash, and sub modules management).

Like I said, it’s pretty intuitive (if you already know Git a bit), the interface is nice (e.g. : graph log looks MUCH nicer than TortoiseGit's horrible one) and it usually shows you what happens in the background when you choose an option : commands line feedback as text, viewable log of past commands, etc. That, I like a lot ! Git Extensions becomes almost a pedagogical tool (i.e. : you learn knew commands and options by using the GUI).

Git Extensions also provides an easy way to configure the whole Git environment: the editor/ the diff and merge tools, SSH connection, etc.

The Keyboard shortcut config is still rudimentary, but the UI for it is there and it looks like it’s going to be expanded.

So... Overall, it’s pretty well done, even if there are still a few bugs (e.g. : the stash dialog kept the stash content visible even when it had been “dropped” or “popped”… this happened only once though.), and the sluggishness (the main problem IMO).

I won’t go into more details here as I’d repeat stuff I already said.

Would/will I use it ? Yes, but the sluggishness make me prefer Tortoise.


================

GUI CONCLUSION ??? None yet, I’m afraid…

Do I have suggestions ? Probably...

- Maybe try sticking to Git GUI and the command line at first.
- Then, try the other GUIs depending on your needs :
---> Need friendliness, “stand alone” polished app feel, speed, clarity/Flexibility of UI and most important features for everyday Git usage? Go for SmartGit first.
---> Most advanced options and a "pedagogical twist" ? Try Git Extensions first.
---> Extended explorer integration + a bit of all the previous stuff (relative friendliness, advanced options and pretty good performance)? Try Tortoise Git.

Want everything ? Use them all. But be careful... :)

So… What to *I* currently use ? I was first mostly on SmartGit, then a combination of the command line + Git GUI and Tortoise. But I must say I also used some of Git Extension config tools (Like the SSH configuration dialog).

The fact that I’m often browsing my repos, mean that those with shell extensions tend to be used more…. Which excludes SmartGit for the moment, but favors Git GUI and Tortoise Git.

The story remains open. I haven’t completely made up my mind… "Ultimately", it doesn’t matter that much, really: all of these manipulate the same thing : Git.  And, yes, I’ve decided to use Git instead of Hg. I’ll give some of the reasons in the sequel. I'm tired now. :)

[2011 03 15 -- 20 48 : Modified the format for better readability. Added a comment about TortoiseGit and its inability to stage before committing ... unless I missed something.]
Title: Re: DVCS ?
Post by: f0dder on March 15, 2011, 03:02 AM
Nice that you're continuing with this - appreciated :)

I still don't have a definitive favorite wrt. GUIs. TortoiseGit, gitk and git-gui all feel a bit rough around the edges. I'm not sure exactly what it is, probably the overall combination of several smaller flaws ("mid 90's linux GUI look", progress not always updated before the command is done (related to calling git.exe and parsing textual output?), et cetera).

PS: "The sluggishness is probably" -> ends mid-sentence.
Title: Re: DVCS ?
Post by: Armando on March 15, 2011, 09:36 AM
Nice that you're continuing with this - appreciated :)

You're welcome.

I still don't have a definitive favorite wrt. GUIs. TortoiseGit, gitk and git-gui all feel a bit rough around the edges. I'm not sure exactly what it is, probably the overall combination of several smaller flaws ("mid 90's linux GUI look", progress not always updated before the command is done (related to calling git.exe and parsing textual output?), et cetera).

I agree. Except for SmartGit maybe, they all feel a but rough. Yes, it is a combination of several factors : look, responsiveness and speed, etc.

Sometimes the UI feels a bit scattered. I find this is especially true with Tortoise Git.



PS: "The sluggishness is probably" -> ends mid-sentence.

Thanks. I'll have to re-read the whole thing as it was pretty late when I wrote it!
Title: Re: DVCS ?
Post by: Armando on March 15, 2011, 11:12 AM
Here's what I plan to talk about/explore next time (in a few days probably... but that doesn't mean that we shouldn't have other related discussions in between ;) ) :

i. Git's Index
ii. File renaming (indexing/staging corollary)
iii. Code/Txt move detection (related to indexinq)
iv. Branching
v. Merqinq
vi. Other more subtle differences between Hg/Git
vii. Expendability
viii. Collaboration tools
ix. Commands
x. Hosting sites
Title: Re: DVCS ?
Post by: Armando on March 15, 2011, 07:52 PM
(Modified the format of previous long posts for better readability. Added a comment about TortoiseGit and its inability to stage before committing ... unless I missed something. I must say that this is a feature I enjoy using with Git GUI : select all the lines/changes you want to stage (i.e.: put in the index) in the different files, and commit)
Title: Re: DVCS ?
Post by: Shades on March 16, 2011, 01:05 PM
I follow this thread with great interest, but lack of time got me never further than actually using the software.

So keep up the good work!  :Thmbsup:

I do have a question though: I assume it is possible to search for a particular change by a particular user using any of the GUI tools?
(the lack of that option is something I absolutely hate from WinCVS / CVS (which I am forced to work with).)
Title: Re: DVCS ?
Post by: Armando on March 16, 2011, 01:36 PM
I follow this thread with great interest, but lack of time got me never further than actually using the software.

So keep up the good work!  :Thmbsup:

Thanks. What I hope : that my hours of explorations can benefit others.

I do have a question though: I assume it is possible to search for a particular change by a particular user using any of the GUI tools?
(the lack of that option is something I absolutely hate from WinCVS / CVS (which I am forced to work with).)

Yes it is. It's one of the powerful thing both Hg and Git can do. But Git can even go a step further and actually show you where that change comes from... e.g.: if lines have been from one file to another.

I planned to talk about it with more precision in another post (don't have enough time right now...) but I can briefly touch on the subject.

In Git, you can look at a file and see where everything comes from using that command and options :

git  blame  -C  somefile

I tried the blame function in Mercurial (the same commands available : hg blame -f  somefile, hg annotate -f  somefile ) and it “works” : it tells you who committed a specific line(s), but doesn’t do the impressive thing Git does here:  telling you in which file it was before! IMO, this is no small advantage.

With all the GUIs mentioned above, you can access the basic "blame" command, no problem. But I don't think that they give you the extra option to also see the actual details of "the last file where the moved lines could be found" (I'll double check that later). But you do see the commit's author, hash, etc.

Except for SmartGit, they pretty much have the same work flow. The GUI is different though (tortoise's is nicer and friendlier, but Git GUI (the default) gets the job done too...)

Git GUI :
-select file  
- explorer context menu : Blame

TOrtoiseGit :
- select file  
- explorer context menu : Blame

etc.


Great stuff...
Title: Re: DVCS ?
Post by: Armando on March 31, 2011, 09:36 AM
I haven't abandoned this thread!  :) But I'm lacking time these days, so here's an article offering an interesting point of view.

Why I Like Mercurial More Than Git (http://jhw.dreamwidth.org/1868.html)

I don't fully share the author's opinion, but he clearly has more experience with both software than I do.

I'm going to keep in mind his remarks as I continue using Git -- which, as far as I'm concerned, has been a pleasure! Contrarily to the author I find that Git's index is a real strength and it does make a difference in my work.
Title: Re: DVCS ?
Post by: ewemoa on May 08, 2011, 10:46 PM
Regarding some SmartGit functionality...

not having an option to use the system JDK but installing it's own separate copy.
Currently there is something like the following bit in section 5.4 of the bundled file quick-start-guide.pdf:

5.4 JRE search order (Windows)
On Windows, the smartgit.exe launcher will search for an appropriate JRE in the following order (from top to bottom):
  • Environment variable SMARTGIT JAVA HOME
  • Sub-directory jre within SmartGit’s installation directory
  • Environment variable JAVA HOME
  • Environment variable JDK HOME
  • Registry key HKEY LOCAL MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

I haven't personally tested this functionality though as I'm currently trying the portable installation (it comes packaged with a JRE).
Title: Re: DVCS ?
Post by: Armando on May 09, 2011, 11:00 AM
Thanks for the heads up ewemoa, and also for bringing back this thread to my mind !  :)
Title: Re: DVCS ?
Post by: worstje on May 09, 2011, 11:21 AM
I think this topic is awesome. I've got little to offer - except that I barely limp by on my own using git for my personal versioning of my projects. Plain stage, commit -m and tag are all I use - and occasionally Git GUI to rollback a bit. I ought to use branches more, but last time I did so while branching from a public repo, I had a lot of troubles integrating changes made to the public repo into my own branch. Manually needing to merge my months old changes each time pretty much made me drop that hobby activity. :(

I love the pointers towards the software packages you've put up there - I might need to try those at some point as the command-line does get a bit annoying at times (especially when dealing with files in sub-directories). You found yourself another reader who patiently awaits new additions to this topic! :)
Title: Re: DVCS ?
Post by: Armando on May 09, 2011, 11:48 AM
Cool then! I just wish I had more time to play with Git myself these days. I use it minimally, but I did a few merges etc. successfully. I mainly use git's GUI (the one that comes with Git by default) and tortoise Git these days.

=====

C-   Some Detail about Git’s Index and "Content based" structure

(This is approximately where I left imy thoughts last time, when I answered Shades' question... So I might as well continue from there.)


so... What's the Git index?


Scott Chacon in Pro Git (http://progit.org/book/ch1-3.html) (an excellent manual, which can be read online) explains :
The staging area is a simple file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the index, but it’s becoming standard to refer to it as the staging area.

John Wiegley, in "Git From the bottom Up", writes :

Unlike other, similar tools you may have used, Git does not commit  changes directly from the working tree into the repository.  Instead, changes are first registered in something called the index.  Think of it as a way of “confirming” your changes, one by one, before doing a commit (which records all your approved changes at once).  Some find it helpful to call it instead as the “staging area”, instead of the index.

While I personally love the concept of staging area and the way Git uses it (I'll tell you why after), not everybody does. Steve Losh Writes :


One of the features that git users talk about often is git’s index (http://book.git-scm.com/1_the_git_index.html). Mercurial has the record (http://mercurial.selenic.com/wiki/RecordExtension) extension, but it’s not really the same thing.

I personally don’t like the index. I feel that git encourages people to check in changesets that contain code which they’ve never tested (or even built) because the index is such a prominent part of git’s workflow.

Yes, one can argue that you don’t actually push changes until you’ve got a working state. The problem is that when you then try to run git bisect later to find a bug you’ll have to waste time skipping over changesets that don’t build. You could use git rebase --interactive to fold partial changesets into one big one, but again, my gut feeling is that few people actually bother testing the results.
-http://stevelosh.com/blog/2010/01/the-real-difference-between-mercurial-and-git/

I'm not an experienced programmer, but  I think that the staging area (index) is very useful. I use it all the time as it's very convenient when you need to group similar changes together. I.e. : if you worked a while without committing anything, you can decide to commit your work in parts using the staging area. Of course you run the risk of having a few commits that won't compile, but then, as M. Losh says, you can just do a "git rebase --interactive to fold partial changesets".

What's telling is what Losh says afterward:


With all that said, I’ve considered creating a Mercurial extension that adds git’s index functionality to Mercurial, because I think it would make the transition to Mercurial easier for git users. I’ve had enough experience with Mercurial’s internals to know that such a thing is possible, but I simply don’t have the time to do it all myself. If you’re interested in helping out please let me know!
-http://stevelosh.com/blog/2010/01/the-real-difference-between-mercurial-and-git/

...  So maybe this index isn't that useless after all. :)

Not all GUIs out there allow to granularly add parts of file changes to the index. The “vanilla” Git GUI allows it very easily (select part of the code you want to “stage” and add them to the index; when you’re finished, commit the whole thing).

While I now realise it's probably not as related as I first thought it was, Git's use of an index is still coherent with the way it keeps track of files changes by storing content, not files.

In "Git Internals", Scott Chacon writes :
It is important to note that it is the contents that are stored, not the files. The names and modes of the files are not stored with the blob, just the contents.

This means that if you have two files anywhere in your project that are exactly the same, even if they have different names, Git will only store the blob once. This also means that during repository transfers, such as clones or fetches, Git will only transfer the blob once, then expand it out into multiple files upon checkout.

This "content driven" structure (if I may say so) has 2 implications I'll try to write about next time -- I'm already late for my next meeting !
Title: Re: DVCS ?
Post by: ewemoa on May 10, 2011, 09:35 AM
Thanks Armando, for your continued efforts  :Thmbsup:

As the topic of the index / staging area in Git is being touched upon, perhaps the following two extensions in Mercurial might be of interest:

  http://mercurial.selenic.com/wiki/RecordExtension
  http://mercurial.selenic.com/wiki/CrecordExtension (demo video (http://vimeo.com/13353810))

The record extension provides the record command, which may be used in lieu of commit. This command lets you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks.

The crecord extension is a curses (i.e. text-based GUI) interface which provides the crecord and qcrecord commands that may be used in lieu of commit or qnew -f. These commands let you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks or lines.

I've used both and much preferred the crecord extension experience (see video link above for a sample).  There were a few times when crecord didn't seem to take note of some things I wanted committed -- but perhaps this has been fixed by now as it has been over half a year since I used Mercurial.

At:

  http://kevin-berridge.blogspot.com/2011/04/mercurial-record.html

I encountered the following:

sometimes you forget to be proactive about separating your changes and then you want to untangle them after the fact.  You can do this using the Record extension.  This is another extension that ships with Mercurial, but you have to enable it to use it.

The Record extension is invoked with "hg record" and will go through the files you've changed (or just the ones you tell it to look at) and will iterative over each change "hunk" in the file.  A change hunk is a set of sequentially changed lines.  For each hunk it asks you if you want to record the change or not.  You simply say "y" if you want it, and "n" if you don't.

The result is a new commit that contains the changes you recorded.  It's a surprisingly easy process.

However, there's a flaw with this approach.  The resulting commit might be broken: it might not compile, or the tests might not pass.  And since it turns directly into a commit, you don't really get the chance to test it...
Title: Re: DVCS ?
Post by: Armando on May 10, 2011, 10:01 AM
Thanks ewemoa  :up: .
the Record and Crecord Mercurial extensions definitely allow a similar workflow.
There's also the MQ extension (Mercurial Queue). I remember liking MQ a lot.

I don't have the time to discuss that in depth, but I also remember that I found it easier to work with the "index" like features in Git using the GUI (Git GUI), than with Mercurial (Tortoise Hg). Things are changing fast though and I'll revisit tortoise Hg in a while to see how it does this whole "partial commit" thing.
Title: Re: DVCS ?
Post by: ewemoa on May 12, 2011, 08:39 PM
There's also the MQ extension (Mercurial Queue). I remember liking MQ a lot.
This looked interesting to me, but I never tried it out.  Perhaps some day...

I don't have the time to discuss that in depth, but I also remember that I found it easier to work with the "index" like features in Git using the GUI (Git GUI), than with Mercurial (Tortoise Hg). Things are changing fast though and I'll revisit tortoise Hg in a while to see how it does this whole "partial commit" thing.
Looking forward to nicer UIs :)

Perhaps I'll try out gitsum for Emacs in the mean time:

  http://chneukirchen.org/blog/archive/2008/02/introducing-gitsum.html (http://chneukirchen.org/blog/archive/2008/02/introducing-gitsum.html)

BTW, any thoughts on the likes of:

  http://nvie.com/posts/a-successful-git-branching-model/ (http://nvie.com/posts/a-successful-git-branching-model/)
Title: Re: DVCS ?
Post by: Armando on May 15, 2011, 01:41 PM
I haven't forgotten this discussion...  :)

I'm just lacking time these days !...  But I plan to continue to contribute to this thread with reflections about Git and Mercurial's various aspects -- although I'm more focused on Git, since this is the tool I chose. (Did I mention earlier that I not only decided to use Git because I like it but also because is my various tests it was easier to convert a Git repo to Mercurial than the reverse ?  :-[)

=====

Perhaps I'll try out gitsum for Emacs in the mean time:

  http://chneukirchen.org/blog/archive/2008/02/introducing-gitsum.html

Cool stuff. I'll have to check that out.

BTW, any thoughts on the likes of:

  http://nvie.com/posts/a-successful-git-branching-model/

Branching is an interesting topic. It's good to see the different strategies used among developers. I saw the article you're referring to a few weeks ago.

The problem is that in my own current project, I don't really need to "branch" that much. It's just not worth it. So I haven't explored that area a whole lot. I've read about it though.
Title: Re: DVCS ?
Post by: ewemoa on May 16, 2011, 11:12 PM
A peripheral SmartGit remark:

It does miss some other important ones though, like “blame”, “stash”, “clone –bare” (last one : surprising, to say the least… Unless I missed something).

FWIW, it looks like there is some kind of stash support (at least in the 2.x series):

[ You are not allowed to view attachments ]

Title: Re: DVCS ?
Post by: Armando on May 17, 2011, 07:54 AM
You're right! I actually discovered the stashing capabilities after writing what I wrote and forgot to edit it. I'll do that now. Thanks ewemoa.
Title: Re: DVCS ?
Post by: ewemoa on May 18, 2011, 06:32 AM
Another SmartGit bit (no, I have no relationship with the product or company :) )...

1- some kind of optional “console like” textual feedback, some commands log view, like the one Git extensions provides (see #4). That would be good (maybe is that a secretly available option but… I didn’t find it).
Not quite what you may have been looking for, but if you look in the .settings directory, there is a file named "log.txt" which contains various details.  Perhaps better than nothing...

From the online docs (http://www.syntevo.com/smartgit/documentation.html?page=installation) there was this general info:

log.txt contains debug log information. It's configured via log4j.properties.

From a SmartGit support list: GIT commands sent by SmartGit (http://smartgit.3668570.n2.nabble.com/GIT-commands-sent-by-SmartGit-td4113010.html):

Is it possible or configurable to view the Git commands executed by SmartGit somewhere? It would be awesome if they were displayed in the status bar or a console popup.

You can find the executed Git commands (and the output of the Git command) in SmartGit's log.txt.
Title: Re: DVCS ?
Post by: Armando on May 18, 2011, 09:26 AM
Thanks ! Cool. Yes, this is certainly better than nothing (in Git Extensions, all commands are apparent so it is very transparent)... and I should've looked for a log file. Bad me.

From your post, this says it all :
It would be awesome if they were displayed in the status bar or a console popup.

This is a bit too well hidden IMO (even the mention of that log in the online docs!).
My log file is in not in the .setting directory but in \Application Data\syntevo\SmartGit\2.


Anyway... considering all that, SmartGit is probably what I'll try to use more in the next week.

Title: Re: DVCS ?
Post by: ewemoa on May 18, 2011, 10:35 PM
My log file is in not in the .setting directory but in \Application Data\syntevo\SmartGit\2.
Ah, my bad...Perhaps it's in .settings for me because I'm using the portable version.

Anyway... considering all that, SmartGit is probably what I'll try to use more in the next week.
Looking forward to any observations :)

BTW, I wanted to search the history of a project via the log window and was stumped initially.  I learned that "search as you type" (they call this speed-search apparently) seems to work.  Was this obvious to you?  I didn't find this in the docs...it was again via a posting to that support list.

Then I spent a while trying to figure out how to search for subsequent occurrences -- finally after trying a variety of combinations, I hit on using the down (for next) and up (for previous) arrow keys...feels odd but at least something works.

On a related note, I've started to investigate gitk and am noticing that it seems to produce more search results than SmartGit for the same search terms in some cases.  It appears that SmartGit doesn't load all commits [1] by default and the searching only seems to take place over what's loaded -- once sufficiently more commits are loaded, additional search results seem to come up...


[1] Found a "Load all commits" menu item via the Query menu.
Title: Re: DVCS ?
Post by: Armando on May 19, 2011, 09:00 AM
Looking forward to any observations :)

I had to keep my old routine for now as I had to get things done... But I still plan to use SmartGit more. Will keep you posted.

BTW, I wanted to search the history of a project via the log window and was stumped initially.  I learned that "search as you type" (they call this speed-search apparently) seems to work.  Was this obvious to you?  I didn't find this in the docs...it was again via a posting to that support list.

Then I spent a while trying to figure out how to search for subsequent occurrences -- finally after trying a variety of combinations, I hit on using the down (for next) and up (for previous) arrow keys...feels odd but at least something works.

Wow, nope, I didn't know about the search as you type feature.
Thanks for sharing all this!
Yes, the arrows do feel a bit odd, but I'll get use to it.

On a related note, I've started to investigate gitk and am noticing that it seems to produce more search results than SmartGit for the same search terms in some cases.  It appears that SmartGit doesn't load all commits [1] by default and the searching only seems to take place over what's loaded -- once sufficiently more commits are loaded, additional search results seem to come up...


[1] Found a "Load all commits" menu item via the Query menu.

Again, nice find.  :up:
Title: Re: DVCS ?
Post by: Armando on May 19, 2011, 11:43 AM
oops... And I forgot to share that new link. A few good things in it.

Exit SVN, Enter Git (http://developers.freshbooks.com/blog/2011/05/16/exit-svn-enter-git/)
Title: Re: DVCS ?
Post by: syntevo on May 19, 2011, 01:26 PM
Hello,

I'm Thomas Singer from syntevo, one of the developers of SmartGit. I was drawn attention to this thread.

Dunno which app(s), though - I wasn't all impressed when I checked out SmartGit, but can't remember exactly why, guess I'll give it another chance. I think my 'meh' was partially causes by the program being implemented in Java, and (worse) not having an option to use the system JDK but installing it's own separate copy.
SmartGit offers three download bundles for Windows, the default one which includes a Java Runtime Environment (so the normal users are using a tested JRE version), one without a bundled JRE (requires an installed one) and a portable one with JRE (stores its settings in the same directory structure, so it can be installed on an USB stick).

It does miss some other important ones though, like “blame”, “stash”, “clone –bare” (last one : surprising, to say the least… Unless I missed something [I did miss the "stash" command which was very obvious  :-[ ] ).
"blame" is on our todo-list. Could you please explain the use-case behind "clone --bare"? Isn't a bare repository usually located on a server without GUI?

I did encounter a few problems and solving these problems meant dropping to the command line. E.g. : how do you "correct" a rebase that’s stalled… and won't abort nor continue ? hmmmm...  8)
Do you mean, that SmartGit sometimes hangs during a rebase? This bug has been fixed in version "2.1 early-access build 5". This was caused by Git trying to open an editor and waiting for it to exit.

The manual is ok, but not as clear as Tortoise’s, IMHO. Very dry, almost no graphs… and so it remains slightly abstract. I’d almost rather read Git’s man pages (not bad at all btw).
You are right, our manual is a weak spot.

On a related note, I've started to investigate gitk and am noticing that it seems to produce more search results than SmartGit for the same search terms in some cases.  It appears that SmartGit doesn't load all commits [1] by default and the searching only seems to take place over what's loaded -- once sufficiently more commits are loaded, additional search results seem to come up...


[1] Found a "Load all commits" menu item via the Query menu.
"Load all commits" does not load all commits from the repository (which might be too large), but instead loads commits which are not reachable from a branch or tag any more, e.g. those which remain after performing an amend-commit. Maybe one has a better name suggestion?

Wow, nope, I didn't know about the search as you type feature.
Thanks for sharing all this!
Yes, the arrows do feel a bit odd, but I'll get use to it.
What shortcut did you expect? What we can do to make the "search-as-you-type" feature more noticeable?

Cheers,
Tom
Title: Re: DVCS ?
Post by: Armando on May 19, 2011, 01:41 PM
Thanks a lot for stopping by! You have a great product, that's for sure.  :up:
I'll take the time to read everything tonight or tomorrow and give you well deserved feedback.
Thanks.
Title: Re: DVCS ?
Post by: Armando on May 20, 2011, 02:18 PM
Since I'm running out of time, I'll have to be brief but might be able to expand during the weekend.

It does miss some other important ones though, like “blame”, “stash”, “clone –bare” (last one : surprising, to say the least… Unless I missed something [I did miss the "stash" command which was very obvious  :-[ ] ).
"blame" is on our todo-list. Could you please explain the use-case behind "clone --bare"? Isn't a bare repository usually located on a server without GUI?

Nice to know blame is on the todo list.
As for the "clone --bare" use-case... If I remember correctly, I think I was toying with the idea of using Dropbox as a Git repository/server and wanted to clone my current working directory to the Dropbox folder. I don't remember all the details at the moment. I'll see if I can find more details later.

I did encounter a few problems and solving these problems meant dropping to the command line. E.g. : how do you "correct" a rebase that’s stalled… and won't abort nor continue ? hmmmm...  8)
Do you mean, that SmartGit sometimes hangs during a rebase? This bug has been fixed in version "2.1 early-access build 5". This was caused by Git trying to open an editor and waiting for it to exit.

That must be it. I will Download the latest version. Thanks for the heads up.
I think I also had another problem with rebase -- not sure. I'll have to checkout my notes and maybe try to reproduce the problem later... that is, if there was a problem.

The manual is ok, but not as clear as Tortoise’s, IMHO. Very dry, almost no graphs… and so it remains slightly abstract. I’d almost rather read Git’s man pages (not bad at all btw).
You are right, our manual is a weak spot.

SmartGit is pretty feature rich. It would greatly benefit from a better manual where all features are clearly documented. A few interface images would be good too...

Wow, nope, I didn't know about the search as you type feature.
Thanks for sharing all this!
Yes, the arrows do feel a bit odd, but I'll get use to it.
What shortcut did you expect? What we can do to make the "search-as-you-type" feature more noticeable?

As you probably know, a lot of Windows applications (text editors, IDEs) use F3 and Shift/ctrl+F3 to move to next/previous occurrence (can't talk about Linux or Mac as I haven't really worked with those in the last couple years and I forgot...). I couldn't say for sure what the standard is, but F3 is what I'm used to... Hence the "awkward" feel.

That said, it's probably not a big deal if everything is documented properly or easily discovered (tooltips or whatever). Arrows are perfectly fine if one knows what they're supposed to do. Documentation is key here.


Other small points I can think of:

- Some other shortcuts feel a bit weird. E.g.: Ctrl+T for staging. I immediately changed it for Alt+Enter, and Ctrl+Alt+Enter for editing the index, which seems much more natural when reviewing changes using Alt+Arrows. This is personal of course... but just saying.

- After staging some content, the focus always moves to the newly staged file, which interrupts the "files modifications reviewing". There might be a way to prevent that but I haven't found it. Question: Could the focus remain at the top of the list and not move? When reviewing files before committing , it's inconvenient to always have to move back to the top of the file list or where the other file to review is located. But like I said, I'm aware that I might be missing something.

And last one for today (something  super minor that occurred to me while using SmartGit this morning):

- Some tooltips seem too verbose.
E.g., in the files section/table : "if selected,  unchanged files will be shown".
Why not simply : "Show unchanged files" ? It's more "to the point" IMO.

Like I said, it's minor, but... the devil is in the details!

Thanks for your attention.
Title: Re: DVCS ?
Post by: ewemoa on May 20, 2011, 04:32 PM
To add my two cents to the following:

As you probably know, a lot of Windows applications (text editors, IDEs) use F3 and Shift/ctrl+F3 to move to next/previous occurrence (can't talk about Linux or Mac as I haven't really worked with those in the last couple years and I forgot...). I couldn't say for sure what the standard is, but F3 is what I'm used to... Hence the "awkward" feel.

When I think of search-as-you-type functionality, one of the first contexts to come to mind is in the "Find" functionality of web browsers.

The following table summarizes what I found for some relatively recent web browsers for invoking next / previous searches:

Chrome 11Firefox 4IE 8Opera 11
Enter / Shift+Enteroooo
Control+G / Control+Shift+Gooxo
F3 / Shift+F3ooxo
Alt+N / Alt+Pxoxx

"o" stands for appears to support.
"x" stands for doesn't appear to support.


P.S. Thanks for stopping by and also for SmartGit :)
Title: Re: DVCS ?
Post by: syntevo on May 22, 2011, 12:10 PM
As you probably know, a lot of Windows applications (text editors, IDEs) use F3 and Shift/ctrl+F3 to move to next/previous occurrence (can't talk about Linux or Mac as I haven't really worked with those in the last couple years and I forgot...). I couldn't say for sure what the standard is, but F3 is what I'm used to... Hence the "awkward" feel.
OK, I'll try to add (Shift+) F3 in the next 2.1 build. Unfortunately, this will be hard-coded and not customizable, because only the shortcuts for menu items are customizable.

- Some other shortcuts feel a bit weird. E.g.: Ctrl+T for staging. I immediately changed it for Alt+Enter, and Ctrl+Alt+Enter for editing the index, which seems much more natural when reviewing changes using Alt+Arrows. This is personal of course... but just saying.
We took Ctrl+T from the Git GUI. BTW, I have changed Alt+Up/+Down to F3/F4 so I only need one hand for navigation...

- After staging some content, the focus always moves to the newly staged file, which interrupts the "files modifications reviewing". There might be a way to prevent that but I haven't found it. Question: Could the focus remain at the top of the list and not move? When reviewing files before committing , it's inconvenient to always have to move back to the top of the file list or where the other file to review is located.
We'll try to find a solution.

- Some tooltips seem too verbose.
E.g., in the files section/table : "if selected,  unchanged files will be shown".
Why not simply : "Show unchanged files" ? It's more "to the point" IMO.
IMHO "Show unchanged files" is ambiguous: it could mean the current state or the action which happens when clicking. Hence we decided to be precise.

@ewemoa: it looks like Microsoft is the only one which does not comply to the Microsoft Windows standard (F3). ;)
Title: Re: DVCS ?
Post by: Armando on May 24, 2011, 01:41 PM
Thanks for your attention to these details.

I wonder if I'm the only one finding that the "moving focus" (when staging files) is a problem. What did you think of it ewemoa?
 
Title: Re: DVCS ?
Post by: ewemoa on May 24, 2011, 08:30 PM
To confirm, do you mean something like the following?

1. Before "Stage" (HEAD vs. Working Tree) - focus is on right side (Working Tree)
[ You are not allowed to view attachments ]

2. After "Stage" (HEAD vs. Index) - focus is on left side (HEAD)
[ You are not allowed to view attachments ]

3. After "Unstage" (HEAD vs. Working Tree) - focus is on left side (HEAD) and cursor has moved up to the top-leftmost position.
[ You are not allowed to view attachments ]
On a separate note, does the right side content look "stale"?  Or may be the label of "HEAD vs. Working Tree" should be "HEAD vs. Index"?

4. After "Reload the previewed file contents" (HEAD vs. Working Tree) - focus is on left side and the cursor is at the beginning of the first difference in text(?)
[ You are not allowed to view attachments ]

FWIW, I got similar results with the cursor starting in an area of the content which didn't change.

OS: Windows XP SP3
SmartGit Version: 2.0.4
Build Date: 2011-04-05
Java Version: 1.6.0_24-b07
Title: Re: DVCS ?
Post by: Armando on May 24, 2011, 11:34 PM
Thanks for the detailed report ! Interesting.

This is actually different than what I was referring to. And these caret moves don't seem to annoy me as I didn't even notice them!

I was actually referring to something more basic : the focus moving in the "Files" section.

[ You are not allowed to view attachments ]

However, I was just able to get it to work  pretty much the way I want by playing with the sorting!  I.e. : files don't move around in the "files" section after staging changes.

I'm embarrassed...   :-[ I'm not sure why I didn't get it before. I did play with the various column sorting before, but I did miss a couple aspects about the sorting mechanism (i.e.: ctrl+click can activate/deactivate the sorting for a column).
Title: Re: DVCS ?
Post by: ewemoa on May 27, 2011, 07:25 AM

With all that said, I’ve considered creating a Mercurial extension that adds git’s index functionality to Mercurial, because I think it would make the transition to Mercurial easier for git users. I’ve had enough experience with Mercurial’s internals to know that such a thing is possible, but I simply don’t have the time to do it all myself. If you’re interested in helping out please let me know!
-http://stevelosh.com/blog/2010/01/the-real-difference-between-mercurial-and-git/

...  So maybe this index isn't that useless after all. :)
BTW, have you seen the same author's post on Mercurial Queues?

  A Git User’s Guide to Mercurial Queues (http://stevelosh.com/blog/2010/08/a-git-users-guide-to-mercurial-queues/)

Stacked Git (http://www.procode.org/stgit/) and guilt (http://www.kernel.org/pub/linux/kernel/people/jsipek/guilt/man/) look interesting too.
Title: Re: DVCS ?
Post by: Armando on May 27, 2011, 03:00 PM
Thanks for the guilt and Stacked Git links. I'll have a look at those during the weekend.  :up:

Yes, I think I read "everything" Losh wrote (when available...) about Mercurial and Git. This article is actually what pushed me to experiment with MQ "at the time". I actually mention  there (https://www.donationcoder.com/forum/index.php?topic=25765.msg248585#msg248585)that I liked MQ.

There are many good articles on MQ (like Mercurial queues just clicked (http://www.stevestreeting.com/2010/04/22/mercurial-queues-just-clicked/) )

And there's this great blog article (also fairly recent -- recommended) :  Mercurial and Git: a technical comparison (http://alblue.bandlem.com/2011/03/mercurial-and-git-technical-comparison.html). Probably nothing you wouldn't learn by reading a few books on Git or Mercurial... but that's exactly the point. A few books is sometimes too much.

In the comments, the author intelligently compares MQ to the Git index/staging area :

Thanks for the comments, and for the link to Mercurial Queues. It's true that queues are something that Git doesn't have; but then again, they're not needed in Git because it has (cheap) branches and you can reorder the commits afterwards.

However, using Mercurial Queues is definitely not the same as using the Git index, nor should it be confused as such. Yes, using Queues can enable you to do (local) feature branching (which is good) but Git's index is the set of things you are *about* to commit.

A case in point: I was merging the old Mac ZFS code and the onnv_72 code, which involved a significant merge set (see https://github.com/alblue/mac-zfs/commit/6d20fbb74f11a). Putting the changeset into perspective: "Showing 604 changed files with 422,503 additions and 1,496 deletions" is the message that GitHub shows.

There is no way I would have been able to commit that with Mercurial Queues. For a start, 100-200 files were in conflict, which would mean either (a) putting some changes in with the conflict markers in place, or (b) backing out the merge node and applying changes incrementally, i.e. doing a manual merge.

However, using the Git index, I was able to solve one conflicted file at a time, and add it into the git index when I had de-conflicted that file. The git status was then able to tell me those files which were different from the index (i.e. those ones which I hadn't de-conflicted yet) and as such, give me a progress report on how far down the de-confliction line was. Once I had all conflicts addressed, and added into the git index, I was able to commit the merge node separately.

So don't get me wrong; I think if you have to use Hg then an extension like Queues (and histedit etc.) are absolutely necessary tools to have at your disposal. But they just replace built in functions of the git tree structure and in no way are able to replace the index.
Title: Re: DVCS ?
Post by: ewemoa on May 31, 2011, 12:56 AM
Thanks for the additional links :)

To diverge a bit, I'm taking a look at etckeeper (http://kitenet.net/~joey/code/etckeeper/) -- a tool to manage a *nix (hmm, not sure about the *BSDs) system's configuration info via a DVCS.  Looks like it's supposed to work with Git, Bazaar, Mercurial, and Darcs.  Perhaps for folks who are looking after certain types of systems, this kind of thing might be an entry point into learning to use one of the DVCS systems.
Title: Re: DVCS ?
Post by: ewemoa on May 31, 2011, 04:28 AM
Came across gource (http://code.google.com/p/gource/) -- "a software version control visualization tool" -- anyone tried it out?

Sample videos (http://code.google.com/p/gource/wiki/Videos) and screenshots (http://code.google.com/p/gource/wiki/Screenshots) :)
Title: Re: DVCS ?
Post by: phitsc on May 31, 2011, 04:46 AM
Does it have any value other than just looking damn cool?

Looks more like a tool to do art than work ;)
Title: Re: DVCS ?
Post by: ewemoa on May 31, 2011, 05:34 AM
Perhaps so :)

...and give the gource developer more practice with OpenGL may be...
Title: Re: DVCS ?
Post by: Armando on May 31, 2011, 10:28 AM
:huh: Woa... Gource is weird. I don't really see the point, but... why not. Maybe I'm just lacking imagination today.

...and give the gource developer more practice with OpenGL may be..

Most likely.
Title: Re: DVCS ?
Post by: ewemoa on June 01, 2011, 07:37 AM
Found Git and Mercurial: Compare and Contrast (http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930) from the comments of:

And there's this great blog article (also fairly recent -- recommended) :  Mercurial and Git: a technical comparison (http://alblue.bandlem.com/2011/03/mercurial-and-git-technical-comparison.html).

Understanding some of the nuts and bolts has really helped me in following (perhaps not completely) documentation and discussions -- for both Git and Mercurial.
Title: Re: DVCS ?
Post by: Armando on June 01, 2011, 08:34 AM
This "comment" is one of the best for git/mercurial comparisons. Read it several times a couple months ago when I was trying to figure out where  I wanted to invest my energy.  :up:
Title: Re: DVCS ?
Post by: wraith808 on June 05, 2011, 08:26 PM
I've always used TFS or VSS, but in absence of consulting and having a server at home, and all I've heard about Git/Subversive/Mercurial, I decided to try something new.  I'm using Git in VS2010 right now.  A couple of really good resources that I've found for getting me up to speed are http://gitready.com/ and http://gitref.org/.

(One question- it seems that your repository in the case that you're not using something like github is purely local- is this true?  And is there a way to have a copy of the repository without another machine?)
Title: Re: DVCS ?
Post by: Armando on June 05, 2011, 10:54 PM
Yes 2 great references.  :up:

I put a list of references a while ago but haven't got the time to really "finalize" it or anything
Since we've been into references lately, here is some of it (there are a few already mentioned... I'll update the list with other entries -- if necessary -- when I'll have more time).

I got many links through this site : A central reference (http://git-scm.com/documentation)

If one is just trying Git and wants to use the basic Git GUI (which is perfectly functional IMO), this is a good "how to" to just learn the basics + a couple more tricks : An Illustrated Guide to Git on Windows (Start using Git with msysgit) (http://nathanj.github.com/gitguide/tour.html)

And then here are my personal favorites :

Pro Git (http://progit.org/book/)

Git Reference (http://gitref.org/creating/) (already mentioned by wraith808)

Git Ready (http://gitready.com/)

Git Magic (http://www-cs-students.stanford.edu/~blynn/gitmagic/)


And then a lot of other useful stuff :

The official tutorial (http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html)

The official manual (http://www.kernel.org/pub/software/scm/git/docs/git.html)

--

Everyday commands (http://www.kernel.org/pub/software/scm/git/docs/everyday.html)

Cheat Sheet (http://cheat.errtheblog.com/s/git)

Git FAQ (https://git.wiki.kernel.org/index.php/GitFaq)

Git for Computer Scientists (http://eagain.net/articles/git-for-computer-scientists/)

Git from the bottom up (http://newartisans.com/2008/04/git-from-the-bottom-up/)


Lots of screencasts/videos… Here are some interesting URLs with a few fun tricks :) :

http://tekpub.com/productions/git
http://blip.tv/file/4213359/
http://blip.tv/file/4094727


And... Good  Comparisons with Mercurial

Git and Mercurial - Compare and Contrast (http://stackoverflow.com/questions/1598759/git-and-mercurial-compare-and-contrast/1599930#1599930)

Mercurial and Git: a technical comparison (http://alblue.bandlem.com/2011/03/mercurial-and-git-technical-comparison.html)


P.S. : BTW, I'm using SmartGit a lot these days and I like it more and more.
I'm still used to the "one pane" diff viewer of the basic git GUI though... for some (strange?) reasons I kinda like it. Anybody else? :)
Title: Re: DVCS ?
Post by: Armando on June 05, 2011, 11:28 PM
One question- it seems that your repository in the case that you're not using something like github is purely local- is this true?

Yes, I imagine, unless you decide to move it somewhere else (other than github).

At some point I was thinking of setting my own "remote server" using a dropbox/spideroak/[...] account and use it as a git remote server. There are already a lot of examples of similar setup on the web. I could share a few links if you're interested.


And is there a way to have a copy of the repository without another machine?

You mean cloning your repo? you can clone a repo wherever you want. From a server or a local machine.
http://www.kernel.org/pub/software/scm/git/docs/git-clone.html

I think you'd need to use the -l  and maybe the --no-hardlinks flags (depending on what you want).

SmartGit and other GUIs make cloning a piece of cake.

I don't know if that answers your questions though...?
Title: Re: DVCS ?
Post by: wraith808 on June 06, 2011, 07:33 AM
Basically, when I wasn't using VSS, I was using a product called QVCS (very good... got a bit slow when the repo became large).  I have two machines at home that I develop on (sometimes 3- but down to 2 right now), so I wanted a repository that I could share between machines, and of course use as a back up.  I know that you can use Git that way, but I was trying to figure out how to do that without a central server.

Thoughts?
Title: Re: DVCS ?
Post by: Armando on June 06, 2011, 10:51 PM
So you want to be able to connect computer A to computer B and pull the changes from one to the other?
Would using something like Dropbox/spideroak a possibility?
There are many blogs where steps are described. A few good ones :

http://intermediaware.com/blog/how-to-use-dropbox-as-a-git-repository#more-17
http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively
https://github.com/agnoster/git-dropbox#readme
http://tumblr.intranation.com/post/766290743/using-dropbox-git-repository

etc.

Generally speaking the setup process seems simple : 1- initialize your local repo, 2- initialize a "bare" repo in Dropbox, 3- link both repo (add origin), 4- push from your "local repo" to Dropbox.
Title: Re: DVCS ?
Post by: wraith808 on June 07, 2011, 07:49 AM
^ I thought that might be possible; but I thought that was also what the (D) in DVCS (http://en.wikipedia.org/wiki/Distributed_revision_control) stood for... distributed?  So I thought it was peer-to-peer from the description.  Is that just a function of Git that it doesn't work that way?  Or is the description wrong at wikipedia (which is always a possibility) or am I misunderstanding something?
Title: Re: DVCS ?
Post by: Armando on June 07, 2011, 09:35 AM
if A and B are on a network, you can directly pull to A from B and conversely.
Title: Re: DVCS ?
Post by: wraith808 on June 07, 2011, 09:52 AM
if A and B are on a network, you can directly pull to A from B and conversely.

So how do I do that?  I didn't see anything about it on any of the reference that I saw, though I might have just missed it.  Can you point me to something that shows how to do that?  I think I see the light... but I just can't figure out whether it's the end of the tunnel or a train...
Title: Re: DVCS ?
Post by: Armando on June 07, 2011, 11:38 AM
I haven't tried it (not my current setup) and I know some here are much more knowledgeable than me. But I gues it would go like that :

1- initialize "yourproject" repo in A and track all files. In your directory:
cd "your directory"
git init
git add *.*

2- in B, create a directory and clone the A repo:
cd "your directory in B"
git clone -l --no-hardlinks "path to your repo in A"

3- in B, add a reference to A:
git remote add "name you want to give to this remote" "path to your repo in A"

4- in A, add a reference to B :
cd "your directory in A"
git remote add "name you want to give to this remote" "path to your repo in B"

Now from A or B, you can pull changes :
cd "your directory in A"
git pull "path to your repo in B"

OR
cd "your directory in B"
git pull "path to your repo in A"


[EDIT : you might want to do a "git fetch" and then a "git diff" followed y a "git merge", rather than a "git pull", that way you can review what you're bringing in.
git fetch doesn’t touch your working tree at all but "pull" will.]
Title: Re: DVCS ?
Post by: Armando on June 07, 2011, 10:04 PM
Just took 15 min to try it (to make sure...) and it seems to work well -- at least with the command line. (P.S.:Using "Pull" rather than "fetch" + "diff" + "merge" for such a setup seems more straight forward.)
Title: Re: DVCS ?
Post by: wraith808 on June 07, 2011, 11:25 PM
Thanks for your help with this.  I'm going to try to set it up tomorrow.
Title: Re: DVCS ?
Post by: kyrathaba on June 08, 2011, 05:31 PM
I've used Tortoise SVN with the Express editions of Visual C#.  Can Mercurial or GIT either one be used with these Express versions, or do they only function with the Professional/Enterprise versions of the Visual Studio IDE?
Title: Re: DVCS ?
Post by: wraith808 on June 08, 2011, 06:17 PM
I've used Tortoise SVN with the Express editions of Visual C#.  Can Mercurial or GIT either one be used with these Express versions, or do they only function with the Professional/Enterprise versions of the Visual Studio IDE?

Both of them operate on the files, so the version of VS shouldn't influence whether they work.  If you're talking about integration with the IDE, that's a different story- you can browse the add-ons in VS to find the git-extensions and see if you can install the SC provider.
Title: Re: DVCS ?
Post by: kyrathaba on June 08, 2011, 06:20 PM
Thanks, that answers my question.
Title: Re: DVCS ?
Post by: Armando on July 08, 2011, 12:57 PM
Some SmartGit (http://www.syntevo.com/smartgit/index.html) feeback...
I've been using it a lot more more since the end of May and I can say it's been extremely stable, reliable and easy to work with. It's a really good product. I'm starting to forget how to use the command line now...

Plus, as you noticed, the developer even dropped by to say hi and discuss criticisms and feature/modifications requests.  :up:

Highly recommended.

====

One thing I wish I could do sometimes, and I still use Tortoise Git for that : in the log window, I'd like to be able to select a bunch of commits and copy each of them in a list with their full message (context menu and/or maybe Ctrl+Shift+c by default).

Ctrl+c (copy) already copies the selected list, showing  dates and the first line of each commit, but it would be nice to be able to do the same but with the whole message content for each entry/commit.

EDIT : One other small thing... "Commit" dialog (ctrl+k) : unless I'm mistaken, apart from hitting tab 2 times when in the commit dialog, there doesn't seem to be a way to hit the "commit" button directly. It would be logical to press alt+c maybe, or just enter. Note that since the commit message is preselected and has the focus, pressing enter clears it! fortunately a ctrl+z will restore it but it can be surprising...
Title: Re: DVCS ?
Post by: Armando on July 08, 2011, 12:58 PM
Thanks for your help with this.  I'm going to try to set it up tomorrow.

Hey Wraith808, I know it's been a while but... Do you finally use that set up or are you using some other strategy ?
Title: Re: DVCS ?
Post by: Armando on September 12, 2011, 11:50 AM
Another pretty good git Article : Git Is Simpler Than You Think (http://nfarina.com/post/9868516270/git-is-simpler)

The article is well written. It gets "more" interesting from the The So-Called “Object Database” section.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 21, 2012, 07:20 PM
I'm having difficulty with SmartGit 3.0.4 and SSL access for self-signed certificates.

The steps I followed are:

Server end:

In SmartGit:

[ You are not allowed to view attachments ]

I expected to be able to bypass the dialog to access any way.

Didn't find anything relevant via a few search engines nor looking through the various settings files.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on April 21, 2012, 10:46 PM
Strange. I'll see if I can test that tomorrow.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 21, 2012, 10:55 PM
Thanks Armando, I appreciate it :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 22, 2012, 12:40 AM
FWIW, via the command line the following sort of thing is one way to get a successful clone with a self-signed certificate:

env GIT_SSL_NO_VERIFY=true git clone https://example.com:4567/myrepos.git

Applying the above, under one *nix, the following enabled SmartGit to work as desired:

env GIT_SSL_NO_VERIFY=true path-to-smartgit-folder/bin/smartgit.sh
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 22, 2012, 05:31 AM
Under Windows XP SP3, via cmd.exe, something like the following worked:

set GIT_SSL_NO_VERIFY=true
start c:\apps\SmartGit\bin\smartgit.exe
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 22, 2012, 05:36 AM
Perhaps setting http.sslVerify to false via git config is an alternative approach.

I guess that may not work if one does not want that to be a global setting and there is no repository for the setting to live in yet (because no initial clone has occurred)...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 22, 2012, 05:49 AM
On a side note, I noticed that SmartGit now supports "git init" -- IIRC, it used to be that one had to use git from the command line for this :up:

Project ->
  New Window ->
    Open an existing local or create a new repository
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on April 23, 2012, 11:06 PM
ewemoa, you seem to be on the right path...
I realize I don't have enough time to delve into that ! I wish I could. Did you send a message to the developer(s) ?

On a side note, I noticed that SmartGit now supports "git init" -- IIRC, it used to be that one had to use git from the command line for this :up:

Project ->
  New Window ->
    Open an existing local or create a new repository


Thanks for the heads up! Didn't notice it. I asked for it a long time ago -- and, like you used the command line or tortoiseGit to to it.


Edit : actually, it was the clone --bare command I was having problems with... and while it's true I usually initialize my repos with the command line or TortoiseGit, i believe SmartGit has been offering the "Open an existing local or create a new repository" for a while (since v2.x) . I might be mistaken though...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 24, 2012, 07:26 PM
Did you send a message to the developer(s) ?

No I didn't.  But then, may be they will see this topic...wishful thinking?

i believe SmartGit has been offering the "Open an existing local or create a new repository" for a while (since v2.x) . I might be mistaken though...

It's quite possible I didn't know it was there earlier :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on April 25, 2012, 12:13 AM
I think contacting the developers is the best way for such a problem -- and especially for an actively developed application like SmartGit.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 25, 2012, 12:54 AM
I don't seem to be having any luck getting a message through to their mailing list -- at least not yet.

May be there's some other way...didn't find an IRC channel.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 06, 2012, 06:49 AM
BTW, does any one know how to tell -- via the Main perspective -- which branch one is on?

I currently bring up the dialog box that appears via Branch -> Switch (Ctrl+G) to figure this out.  I'm hoping there's some obvious place I'm missing on the Main perspective I can look to get that information...

I started to feel the need for this after using the cherry-picking functionality (nice to have :) ).
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on May 06, 2012, 12:19 PM
BTW, does any one know how to tell -- via the Main perspective -- which branch one is on?

In the the "directories" section/pane, the top directory should have the branch specified in parenthesis.**

E.g. MyCode  (master)

----

Yup, cherry-picking is useful... if you're careful ! :-)


** that said, it could be made more visible. The window title bar would be a good place.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 06, 2012, 07:12 PM
In the the "directories" section/pane, the top directory should have the branch specified in parenthesis.**

Great!  Thanks a lot for pointing that out -- much appreciated :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 12, 2012, 12:50 AM
I wanted to rename a file and a directory today but failed to find a simple way to do this from SmartGit.  Ended up using git mv from the command line

Has anyone figured out how to do this simply via SmartGit's UI?  The online user manual had the following bit in it (http://www.syntevo.com/smartgit/documentation.html?page=concepts-svn#svn-known-limitations), so may be there isn't a nice way:

Explicit copy and move operations are not possible, Git recognizes them automatically.

However, that bit of text was from "Known limitations" under "SVN support configuration" though so may be it's not relevant.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on May 13, 2012, 09:33 PM
You're working with Git ? Is there a reason why you wanted to do an explicit rename ? Normally Git is good at automatically detecting renames.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 14, 2012, 05:08 AM
It seems odd to me that via the command line one can use git mv, yet there does not appear to be something comparable in the SmartGit UI (hopefully there is something and I have just missed it).

Do you have any recommendations as to how to cope with renaming through SmartGit's UI?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on May 28, 2012, 01:16 PM
Sorry, your post got lost in my emails for some reason... I'll look at that this WE.
Did you find any solution ?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 28, 2012, 04:31 PM
Haven't found a solution within SmartGit so far.

Did get me to learn a bit about using Git through Emacs though :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on November 05, 2012, 06:30 AM
Just found the Index Editor feature.  IIUC, this allows one to not commit all changes in a file, but rather to choose portions (like git add -p (http://johnkary.net/git-add-p-the-most-powerful-git-feature-youre-not-using-yet/)?).  Commits can be more focused, so reviewing history can be easier...I think :)

Seems quite nice  :up:



Found the following documentation to be helpful:

  Staging, unstaging and the Index Editor (http://www.syntevo.com/smartgit/howtos.html?page=workflows.index)



Possibly a (minor?) gotcha...

The documentation states:

Only the contents of the middle and the right editor can be modified. You can alter the contents of the Index either by editing the contents of the middle editor, or by moving chunks between the three editors. To do so, either click on the arrow and 'x' buttons between the editors, or click on the Take Left and Take Right buttons on the toolbar. After you're done, save your changes and close the Index Editor.

IIUC, the middle here represents the index and the right is the corresponding file in the working tree.  So I think that although it's called "Index Editor", one can also edit working tree content -- may be this can be convenient...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on November 24, 2012, 08:36 AM
Armando,

Did my first interactive rebase today -- great stuff  :up:

Wanted to see if SmartGit has some nice GUI for it and found:

  http://smartgit.3668570.n2.nabble.com/Interactive-rebasing-td7572897.html (http://smartgit.3668570.n2.nabble.com/Interactive-rebasing-td7572897.html)

Don't know if there's anything there yet -- have you come across anything?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on November 25, 2012, 07:26 AM
FWIW, it looks like there is some kind of stash support (at least in the 2.x series):

Spent some time trying to figure out how to view stash content -- perhaps the following may be helpful for someone else.

IIUC to view the content of a stash, open the log view (Control+L here), and find rows corresponding to a stash:

[ You are not allowed to view attachments ]

The left highlighted section shows two rows:

  The row beginning with text "On master" appears to represent tracked file changes in a particular stash.

  The row beginning with text "untracked files" appears to represent untracked files for the same stash.

By selecting one or the other row, other areas of the UI change correspondingly (e.g. the Files tab -- the right highlighted area in the image).  Subsequent examination of appropriate areas of the UI appear to let one determine what is in a particular stash.

For reference, this was in a 3.x series SmartGit client.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on November 26, 2012, 09:27 AM
Hi ewemoa,

Thanks for your nice example ! Git is fun, isn't it ?

I've been using the index editor and stashing capabilities quite a bit in the last 1.5 year. Rebase, not as much. Maybe because I'm mostly working on my own, I don't mind having a few meaningless commits. I haven't looked for rebase interactive in the new SmartGit ; but, as you say, it doesn't seem to be implemented yet. Should be soon as the developer mentioned an available preview in October.

Apart from that, yes, stashing can be extremely useful. E.g. for those times where I find a bug that should be fixed before pursuing some coding : stash the current work, do the bug fixing, come back to previous coding by reapplying stash.

You mentioned renaming in a previous post. I still use the command line when I want to do an explicit file rename. But I usually don't have to as Git detects those if you're careful not committing renames with a bunch of other changes.

--

SmartGit proved to be quite user friendly, stable and helpful. Used it almost exclusively, together with TortoiseGit which has some great features implementations too (I especially like the fact that I can select and copy commits from the log view and I'll get a nice clean copy of all of them, with the comments... I use that for quickly creating reports). Also, SmartGit now supports Hg, which is a good thing for those of us who use mercurial !
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on November 26, 2012, 08:21 PM
Thanks for the response :)

Git is fun, isn't it ?

He he -- once I figure out how to do something I'm stuck on, perhaps so.

Rebase, not as much. Maybe because I'm mostly working on my own, I don't mind having a few meaningless commits.

I take the log rewriting features to be a longer term investment -- for those days when I don't remember so well what was done before (wait...isn't that most days?).

One of the benefits I'm experiencing through the use of DVCS has to do with reviewing code -- at commit time, when viewing the log, etc.  I find it tends to uncover opportunities for improvement.  When one's log consists of commits that are easy to understand and are focused, I find the reviewing tends to be easier.  I am guessing that modifying past commits can aid in this process.

Apart from that, yes, stashing can be extremely useful. E.g. for those times where I find a bug that should be fixed before pursuing some coding : stash the current work, do the bug fixing, come back to previous coding by reapplying stash.

Definitely seems like a good time to use stashing.

What I've been using it mostly for is the following sort of situation:


Before learning how to use the stash, I was using the Index Editor to selectively commit -- but I've found that after one accumulates enough changes, picking out the relevant bits can become error-prone and overwhelming.  He he...I need better planning too.

Still trying to develop the habit of pausing to stash before starting work on something unexpected though.

You mentioned renaming in a previous post. I still use the command line when I want to do an explicit file rename. But I usually don't have to as Git detects those if you're careful not committing renames with a bunch of other changes.

I use the GUI but manually remove and add.  Still seems like it'd be nice if there were explicit support for renaming!

SmartGit proved to be quite user friendly, stable and helpful. Used it almost exclusively, together with TortoiseGit which has some great features implementations too (I especially like the fact that I can select and copy commits from the log view and I'll get a nice clean copy of all of them, with the comments... I use that for quickly creating reports). Also, SmartGit now supports Hg, which is a good thing for those of us who use mercurial !

It's nice to have that Hg support  :up:

As I try hard not to use applications that modify the registry, I have not really used TortoiseGit -- a pity, as it seems so nice.  I wonder if there's a way to get it to work with 3rd party Explorer alternatives...



Apart from interactive rebasing via the command line, I've been using magit in Emacs a bit.  Once I got the hang of the UI idea, I've been finding it to be pretty decent.

FWIW, the following screencast was very helpful in getting started:

  Meet Magit (http://vimeo.com/2871241)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on December 17, 2012, 01:30 PM
Never said thanks ...  :)
Will take a look at Magit.  :Thmbsup:
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on December 30, 2012, 05:53 PM
This may be documented somewhere, but since it caught me by surprise...

I noticed that if:


The commit appears to include the selected files even if changes from them have not been registered with the index.

This seems like it can be convenient at times (as well as a good reminder to check the list of files that have changes in the commit dialog), but I think over time it's likely that it will lead to unintentional changes making it into commits.

I'm not sure yet what happens if there is a file selected (AND the Files view has focus) AND the file has some changes registered with the index, and then a commit is executed. the whole file from the working tree appears to get staged -- so all changes seem to get committed.

FWIW, my brief exploration of the preferences didn't turn up any option to disable this behavior.



Armando: Hope you got a chance to check out magit.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on January 19, 2013, 01:21 AM
Did my first interactive rebase today -- great stuff  :up:

Wanted to see if SmartGit has some nice GUI for it and found:

  http://smartgit.3668570.n2.nabble.com/Interactive-rebasing-td7572897.html (http://smartgit.3668570.n2.nabble.com/Interactive-rebasing-td7572897.html)

Don't know if there's anything there yet -- have you come across anything?

Based on:

  What's New in SmartGit/Hg 4? (http://www.syntevo.com/smartgithg/whatsnew.html)

Looks like there is more support for interactive rebasing in version 4.x:

Before pushing, you can cleanup your commits visually (except of merge commits): reorder commits by using drag and drop, join adjacent commits or edit commit messages.

Screenshot:

  http://www.syntevo.com/smartgithg/version-4/pushable-commits-dnd.png



Below are some screenshots:

editing commit messages
[ You are not allowed to view attachments ]

joining commits
[ You are not allowed to view attachments ]

reordering commits via dragging and dropping
[ You are not allowed to view attachments ]

In each case, this was for commits that have not been pushed (anywhere?) yet.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on January 21, 2013, 10:31 PM
Came across the following SmartGitHg docs:

  Modifying the History (http://www.syntevo.com/smartgithg/howtos.html?page=workflows.modify-history)

Sections for:


A brief reading suggests the content may not have been updated for the version 4 series (e.g. no mention of "joining commits").

However, since the current release of version 4 doesn't appear to support the bold-faced sections in as convenient a fashion as the non-bold-faced ones, the docs still seems potentially useful.

Haven't tested the instructions yet so not sure if any of the bold-faced section steps are easier than using interactive rebasing from the command line.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on January 24, 2013, 11:04 AM
Thanks for the updates, Ewemoa. V4 seems like it's bringing useful features to the table. I'll see if I have the time to update today.

(Also : the "Blame" command is very useful for debugging. I've used quite a few times.)

The commit appears to include the selected files even if changes from them have not been registered with the index.

This is quite true. I made a few mistakes in the past. I don't find it that annoying though as I forces me to be more vigilant when I commit -- i.e. review each changes made to the code before indexing & committing.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on January 30, 2013, 01:32 PM
Rather surprising:

http://blogs.msdn.com/b/bharry/archive/2013/01/30/git-init-vs.aspx

Visual Studio will have Git support – and concretely, we released a CTP of a VSIX plugin for the Visual Studio 2012 Update 2 CTP today.

...

Why are we incorporating Git?

When we made the decision that we were going to take the DVCS plunge, we looked at many options.  Should we build something?  Buy something?  Adopt OSS?  We looked at Git, Mercurial and others.  It didn’t take long to realize that Git was quickly taking over the DVCS space and, in fact, is virtually synonymous with DVCS.  We thought hard about building something.  Git hasn’t been as friendly for Windows developers as on other platforms.  By building on Git, we can take all the time we might spend just “catching up” and spend that effort on something where we can add more distinctive value.  Choosing Git just made sense.

...

Older versions of VS & TFS – At this time, we are not planning to include Git integration in older versions of VS or TFS.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on January 30, 2013, 01:58 PM
Pretty surprising, yes! It somewhat corroborates the perception/idea that Git is 1- great at what it does 2- and a/the "major player" in the DVCS (or maybe even the whole VS) ecosystem...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: f0dder on January 30, 2013, 02:22 PM
Interesting to see MS adopt Git as an official first-rate citizen.

And it's going to be interesting to see what "His Screwyouness" has to say about this ;p
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on January 30, 2013, 02:55 PM
Interesting to see MS adopt Git as an official first-rate citizen.

And it's going to be interesting to see what "His Screwyouness" has to say about this ;p


Who is His Screwyouness?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: f0dder on January 30, 2013, 03:06 PM
Who is His Screwyouness?
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! :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on January 30, 2013, 05:48 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. :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on January 31, 2013, 01:15 AM
I was glad to see there is something like libgit2 (http://libgit2.github.com/) 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: f0dder on January 31, 2013, 01:47 AM
I was glad to see there is something like libgit2 (http://libgit2.github.com/) 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on January 31, 2013, 07:16 AM
I was glad to see there is something like libgit2 (http://libgit2.github.com/)

Ooo, how nice.  Thanks for the link  :Thmbsup:
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on January 31, 2013, 09:27 AM
I was glad to see there is something like libgit2 (http://libgit2.github.com/)

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

Indeed!
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: f0dder on January 31, 2013, 11:07 AM
Aaaaand there's a sweet little Channel9 video (http://channel9.msdn.com/posts/GitForVisualStudioTFS) on the topic, ~7min.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on February 06, 2013, 02:03 AM
Anyone tried GitHub's Windows client (http://windows.github.com/)?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on February 06, 2013, 05:55 AM
Not me... but thanks for the heads up!
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on February 07, 2013, 08:54 AM
Maybe nothing that you didn't already know : Git Tips From the Pros (http://net.tutsplus.com/tutorials/tools-and-tips/git-tips-from-the-pros/)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on February 16, 2013, 05:18 AM
In related news, it looks like BitBucket has been porting their git/mercurial client (SourceTree) to Windows as well:

http://blog.sourcetreeapp.com/2013/02/14/sourcetree-for-windows-beta-signup/
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on February 19, 2013, 10:32 PM
Seems nice. Thanks Jibz.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 13, 2013, 12:52 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.:




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 (http://www.syntevo.com/smartgithg/tour.html)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 13, 2013, 12:53 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...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on April 13, 2013, 01:25 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)...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 02, 2013, 04:46 AM
SmartGit/Hg 4.5 was released recently.

Some interesting parts include:


via:

  What's New in SmartGit/Hg 4.5 (http://www.syntevo.com/smartgithg/whatsnew.html)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on June 15, 2013, 07:42 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 :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 08, 2013, 09:48 PM
I haven't used git flow (http://nvie.com/posts/a-successful-git-branching-model/), but it looks like a recent version (4.6?) of SmartGitHg added support for it (http://www.syntevo.com/smartgithg/whatsnew).
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on July 15, 2013, 12:05 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 17, 2013, 04:09 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 (https://github.com/jonas/tig).  Anyone tried it?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: mouser on August 13, 2013, 05:43 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 (https://www.donationcoder.com/forum/index.php?topic=35480.0)) 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on August 31, 2013, 05:21 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on August 31, 2013, 05:25 AM
being able to stage individual hunks is a really nice way to avoid commits that contain multiple unrelated changes.

Yes, yes, yes  :up:
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: mouser on August 31, 2013, 11:57 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.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on August 31, 2013, 05:29 PM
FWIW, I didn't get it either until some experience had been digested :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Ath on March 27, 2014, 02:53 AM
For those using/interested in GIT this Infoworld article might be useful: Git smart! 20 essential tips for Git and GitHub users (http://www.infoworld.com/print/239093)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on March 27, 2014, 09:53 AM
Thanks!
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on March 27, 2014, 10:27 AM
A Note About Git Commit Messages (http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) might also be worth checking out. Commits that just say "changed some stuff" are not much use to others (or yourself a couple of weeks later ;D).
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on March 28, 2014, 02:06 PM
A few good tips, yes. For commits I use similar conventions. The key point is consistency. I like to summarize what I did in the first line, then highlight what I changed in classes and methods/functions, if significant (i.e. "knowing it could help in the future").
Of course, in Git all the changes are already easily visible (especially with a nice GUI like SmartGit/Hg), but a little English (or whatever "natural" language) can help... a couple weeks later  ;) .

Summary/title

More details  if necessary

* Class1 : what I did
- method1() : what I did (very briefly)
- method2() : what I did

*Class2 : ...
- method3() :

etc.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: phitsc on May 09, 2014, 03:10 AM
Just stumbled over what seems to be a very nice git book/tutorial available for free online.

http://www.vogella.com/tutorials/Git/article.html

Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 09, 2014, 06:48 AM
Thanks for that.

On a side note, I haven't gone through that one, but I've found a number of Vogella's Android tutorials to be worth looking at.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: phitsc on May 09, 2014, 07:43 AM
Ok, now check this out:

http://git-man-page-generator.lokaltog.net/

:D
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on May 09, 2014, 10:55 AM
 ;D
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on May 09, 2014, 09:06 PM
Funny and sad at the same time!
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: phitsc on May 10, 2014, 12:00 AM
Funny and sad at the same time!

Indeed. It seems like using git not only serves the purpose of versioning your files, but also to excercise your brain.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on August 08, 2014, 06:18 AM
tig (https://blogs.atlassian.com/2013/05/git-tig/) seems to be a pretty decent terminal-based UI to git -- since it's ncurses-based, I don't know if it will run on non-*NIX systems.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: phitsc on October 20, 2014, 03:46 AM
Anyone knows any good git videos / talks?

I've seen https://www.youtube.com/watch?v=1ffBJ4sVUb4 on the weekend, which was kind of boring. While I liked the presenter's idea to visualize with children's toys how the repository builds up, his presentation style (screen switching) and the many questions during the talk really broke the flow of the presentation and made bad use of the 90+ minutes. I really think he should have used two projectors instead of switching back and forth between his computer screen and the camera. And I also think that he should have instructed the audience to only ask questions at the end.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: mwb1100 on October 20, 2014, 12:57 PM
It's been a while since I watched them, but I recall Scott Chacon's git videos as being pretty good.  A google should net you some that you can check out to see if his style works for you.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on October 20, 2014, 05:40 PM
Here are some of them:

Stimulated:
  Introduction to Git with Scott Chacon of GitHub (https://thenewcircle.com/s/post/399/video_introduction_to_git_with_scott_chacon_of_github)

Relaxed:
  Getting Git (http://vimeo.com/14629850)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on October 20, 2014, 06:00 PM
Here's a list I put together 2-3 years ago in an earlier post : https://www.donationcoder.com/forum/index.php?topic=25765.msg251306#msg251306
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on October 20, 2014, 06:11 PM
Unfortunately no luck reaching the three under "Lots of screencasts/videos… Here are some interesting URLs with a few fun tricks"...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on October 20, 2014, 06:19 PM
BTW, there was a finally a concrete case here for using Stacked Git.  For maintaining a number of simple patches to some "upstream" it is working pretty well here.  There is even an Emacs interface (perhaps a second one that works with magit -- though that's not what I've tried).

Trying to keep the patches "grouped" isn't something I've figured out though -- heard that topgit might be better for that sort of thing, but so far don't know how to work sanely with the generated history so have been sticking to Stacked Git.

Anyone else using this type of thing?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on October 20, 2014, 07:13 PM
Unfortunately no luck reaching the three under "Lots of screencasts/videos… Here are some interesting URLs with a few fun tricks"...

You're right, seems like the screencasts have been removed.

I haven't been coding for a little while  :( ...   so... have no experience with Stacked Git. Sounds interresting...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 06, 2015, 10:25 PM
Anyone know of a modern comparison between Git and Mercurial? A few years ago when I first looked into them, they were both fairly new, and git hardly even worked on Windows. At the time, as a Windows user, Mercurial was the clear winner as far as ease of use and friendly tools to make the commandline stuff easier/unnecessary.

But both Git and Mercurial have been heavily developed over the years, adding who knows what features. And with the popularity of github, Git and tools for it have become developed enough that it may be worth revisiting this decision for future coding projects. I'd like to see an up to date, modern comparison of their features and tools, as I'm considering making the switch from Mercurial to Git if I feel it's worth it. Unfortunately, all my searches just give me links/information dated anywhere from 2008-2012, which was within the range of time when I originally did my research and chose Mercurial.

So, I repeat, does anyone know of a good, modern comparison of Git and Mercurial?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on July 07, 2015, 12:03 AM
I don't think I'd change my versioning system if I was already using Mercurial, unless I was going to work with people using Git (which means: a lot of programmers). If I was free to choose though, I'd probably choose Git again.  :)  I like it and SmartGit/Hg makes it a breeze to use. But that's not answering your question.

Since I haven't been looking for comparisons in the last couple years, I googled a bit and the trend is definitely gitty (http://www.google.com/trends/explore?hl=en-US&q=/m/05vqwg,+/m/09d6g,+/m/012ct9,+/m/08441_&cmpt=q&tz&tz&content=1#q=%2Fm%2F05vqwg%2C%20%2Fm%2F09d6g%2C%20%2Fm%2F012ct9%2C%20%2Fm%2F08441_&cmpt=q&tz=Etc%2FGMT%2B4). Probably because of GitHub, but there are also other technical (and historical) reasons that are probably not that meaningful anymore these days, from a usability perspective (i.e. reasons that don't translate into real technical advantages -- Mercurial and Git constantly improve and play "catch up"). If anything, Git seems here to stay, and Mercurial doesn't seem to be gaining much popularity, despite its facebook adoption.

Anyway, I could post many links, but I didn't find any long, interesting, in depth, technical or "sociological" comparison. I'm Curious if anyone will find anything great from late 2014 or 2015.

I guess the question is now mostly "what do you need for that specific job". Are you dissatisfied with Mercurial?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 07, 2015, 12:51 AM
My question mostly arises from the fact that since Git is the clear popular DVCS, there are new technologies/services being built to be used in conjunction with Git. My specific use/need/desire to make the transition from Mercurial to Git is that I do most of my coding for the Unity game engine, and they've recently-ish started a service called Cloud Build (https://build.cloud.unity3d.com/landing/) which will check your repository for changes, and then automatically make builds of your game for multiple platforms.

They fully support Git, and have for several months. Even on the free plan. Mercurial support was only added within about the past month, and it's locked behind a $100/mo paywall.

But I've been using Mercurial for years and am a little hesitant to just hop on over to Git. I would want to make sure that all the features that I make regular use of in Hg are (easily) available in Git. For example, I use TortoiseHg and I make liberal use of the "Shelve" feature, as well as what I'm going to call "selective commit" since I don't know the name of it. Here's a screenshot of what I'm talking about:

[ You are not allowed to view attachments ]

See how I unchecked the box so that change won't be included in the commit? It's important for me to be able to do something like that in Git about as easily as I can in TortoiseHg. I can also shelve things as entire files or selectively like that as well.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 07, 2015, 01:05 AM
It's definitely possible to selectively place chunks of code in the staging area and then create a new commit (thus leaving things out).

The UI for this is pretty decent in SmartGit -- there is an "Index Editor" (a 3-pane-ish UI for modifying the staging area AKA index).

I'm going to assume you aren't an Emacs user, but FWIW, magit (a popular(?) git interface for Emacs) also has a UI for it.

There's also the text-based UI (https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging) -- though I haven't tried it with Windows.

On a side note, haven't read it recently, but at some point I found the following useful:

  https://mercurial.selenic.com/wiki/GitConcepts

(Please note specifically the section about Git's staging area -- section 2.2.)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 07, 2015, 01:21 AM
I've been reading the Git tutorials from Atlassian (https://www.atlassian.com/git/tutorials/). Sounds like the Staging Area would cover my needs/wants for "selective commit" and the Stash (which I'm still unsure how to use) would cover my needs/wants for Hg's Shelves.

I've been using SourceTree (http://sourcetreeapp.com/) to easily handle making/merging/closing branches for the Gitflow workflow (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) (in Mercurial) and TortoiseHg (http://tortoisehg.bitbucket.org/) for all the actual committing, shelving, pushing, pulling, etc.

I'll download SmartGit and see if I like that any better than SourceTree. I don't really care for SourceTree's interface, but I like how it has built-in Gitflow tools, so I keep it around for that. Though I suppose if SmartGit has better branch management than TortoiseHg (which basically doesn't have anything for creating or closing branches), I may not even need SourceTree anymore.

Then again, I think "branches" are different things in Git than they are in Mercurial...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 07, 2015, 01:23 AM
On a side note, haven't read it recently, but at some point I found the following useful:

  https://mercurial.selenic.com/wiki/GitConcepts

(Please note specifically the section about Git's staging area -- section 2.2.)

Thanks, I'll take a look at that. Though I think I need the reverse of that. A guide to migrating to Git from Mercurial.  :D
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Jibz on July 07, 2015, 04:59 AM
Much like you, Deozaan, I looked at Git and Mercurial back when they were fairly new to Windows, and concluded that Git was a mess of *nix specific stuff, and Mercurial was much easier to grasp and get to work on Windows.

A year or two ago, I got sufficiently annoyed by not being able to use GitHub, that I tried Git. At first it was a pain, but after reading some articles on the background and inner workings of Git I kind of liked the simplicity underneath (for instance chapter 2 of Git Internals (https://github.com/pluralsight/git-internals-pdf)). And the staging area and selective commits were just great. I also liked the feature-branch idea -- branches are cheap, so you can use them to try something out, and if it doesn't work, just remove the branch and everything is gone again.

Btw, in SourceTree, you can both add individual "hunks" (which are the blocks the diff algorithm produces) to the staging area, or you can click a line and use shift+drag/cursor to select individual lines within a hunk to add:

[ You are not allowed to view attachments ]

I use this a lot, since I have a tendency to do drive-by-edits :-[.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on July 07, 2015, 11:24 AM
I've been using SourceTree (http://sourcetreeapp.com/) to easily handle making/merging/closing branches for the Gitflow workflow (https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) (in Mercurial) and TortoiseHg (http://tortoisehg.bitbucket.org/) for all the actual committing, shelving, pushing, pulling, etc.

Another vote for sourcetree.  Especially since I use bitbucket for my remotes.  I've taken to having an origin on my NAS and another on bitbucket.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 08, 2015, 01:53 AM
(for instance chapter 2 of Git Internals (https://github.com/pluralsight/git-internals-pdf))

OK, why the smurf is that PDF written/designed in landscape mode? :huh:

But thanks for the other tips. I never really messed much with SourceTree for committing things. But after playing around with it for a few minutes, prompted by your tip, I do feel that it (using a Git repository) actually gives me more control than TortoiseHg (Mercurial repository) does to stage specific lines of code rather than what it calls entire hunks. That's really cool!

The Stash feature seems to be an all-or-nothing affair, which, if true, seems a bit unfortunate. I'd love to have the same level of control as the staging area for what I want to stash and what I don't. But with the optional exception of "keeping all staged changes", it seems to stash every change, reverting the repo back to a clean slate. Bummer!

EDIT: After further testing, SourceTree seems to work the same way with Mercurial shelves. But it's actually worse since there is no staging area, so it really is all-or-nothing. That's too bad. I know from TortoiseHg that shelving can be much more selective/precise than that. But I guess that lets me know that Git Stashes could probably be more selective as well if I had a better tool to do it.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 08, 2015, 08:12 AM
I've only really used git stashing for "save this current state so it can be returned to later" functionality.

Glancing at the man page (https://www.kernel.org/pub/software/scm/git/docs/git-stash.html), it appears there's a --patch option:

With --patch, you can interactively select hunks from the diff
between HEAD and the working tree to be stashed.
The stash entry is
constructed such that its index state is the same as the index
state of your repository, and its worktree contains only the
changes you selected interactively. The selected changes are then
rolled back from your worktree. See the “Interactive Mode” section
of git-add(1) to learn how to operate the --patch mode.

Note that this is for git stash save ...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 08, 2015, 04:53 PM
I read through Chapter 2 of Git Internals and almost all of it made sounds and sounds really nice. But I have to admit I got totally lost on the subject of rebasing. Usually when I had trouble following the descriptive text, I could look at the illustrations and figure out exactly what was going on. But I'm still not grasping how rebasing works or exactly what it does after having fully read the text and studied the illustrations for some time.


Also, I'm a little confused about something with regard to how Git stores blobs. I like how it doesn't care about files or filenames, and that if the content is the same, it will only store it once. But doesn't that mean if you make one tiny change to a file, it has to store the entire file again as if it was a brand new file? Shouldn't that make the size of the repo huge?

On the other hand, as I understand Mercurial, it stores diffs, but this can mean that duplicate files or move/renamed files are stored multiple times in the same repo, increasing storage size as well.

I do rename or move files occasionally, but I modify existing files a lot more often than I move/rename them. But doesn't this fundamental difference in how each DVCS store data mean that Git repos will generally be larger than Mercurial repos? Or is there something else I'm not grasping?


Finally (at least for now) I'm still a bit unsure about Garbage Collection. Or the fact that in Git, parts of your history can simply disappear. It seems worrisome that things can disappear and be as if they never existed in the repo. In some cases, I can see how that would be nice (like if you accidentally included a file you didn't have permission to distribute), but the description in Chapter 2 seemed to indicate that things would somewhat often be garbage collected through normal use of Git. Scary! I had assumed that to make things disappear as if they'd never existed, it would require some advanced and very intentional edits to the history.

Maybe I just haven't yet gotten to the part where he goes into further detail about what circumstances will cause garbage collection which will allay all my fears/concerns, but for now with what little info I have about it, it's somewhat alarming.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 08, 2015, 05:09 PM
For the moment, just this part:

Also, I'm a little confused about something with regard to how Git stores blobs. I like how it doesn't care about files or filenames, and that if the content is the same, it will only store it once. But doesn't that mean if you make one tiny change to a file, it has to store the entire file again as if it was a brand new file? Shouldn't that make the size of the repo huge?

Check out the part that starts:

While that's true and important on the conceptual level, it is NOT true at the storage level.
Git does use deltas for storage.

toward the end of http://stackoverflow.com/questions/8198105/how-does-git-store-files/8198276#8198276

I don't know about being more efficient than any other system, but regarding storing deltas, I have seen that claim in a few other places (sorry, didn't find references so far).
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 08, 2015, 05:22 PM
But I have to admit I got totally lost on the subject of rebasing. Usually when I had trouble following the descriptive text, I could look at the illustrations and figure out exactly what was going on. But I'm still not grasping how rebasing works or exactly what it does after having fully read the text and studied the illustrations for some time.

Among other things, the following has a section on rebasing with images:

  https://marklodato.github.io/visual-git-guide/index-en.html

There's also this:

  https://git-scm.com/book/en/v2/Git-Branching-Rebasing

Do those help at all?
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 08, 2015, 07:35 PM
Check out the part that starts:

While that's true and important on the conceptual level, it is NOT true at the storage level.
Git does use deltas for storage.

toward the end of http://stackoverflow.com/questions/8198105/how-does-git-store-files/8198276#8198276

I don't know about being more efficient than any other system, but regarding storing deltas, I have seen that claim in a few other places (sorry, didn't find references so far).

Aha! So Git stores data contents as blobs, and then stores a delta of the blobs, rather than a delta of the files. That makes more sense. And I also think that also makes sense that it's more efficient than other systems, since (AFAIK) they all store data on a file level. Therefore if you move or rename a file, you get things being stored multiple times.

Thanks! (Now to look into the other links you provided me...)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: irkregent on July 10, 2015, 03:48 PM
Just to muddy the waters here a bit, it looks like a new desktop version of git is coming, promising "the same, native experience on OS X and Windows operating systems":
desktop.github.com (https://desktop.github.com/)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: irkregent on July 11, 2015, 03:43 PM
I also ran across gitless (http://gitless.com/), which seems to be an easier-to-grok command line replacement for the usual git commands.  No Windows build, though.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 12, 2015, 07:37 AM
Hadn't seen that one -- thanks for mentioning it.

If that sort of thing is of interest, perhaps the following will be too:

  https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Version_Control_Interface_layers
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 12, 2015, 10:57 PM
But I have to admit I got totally lost on the subject of rebasing. Usually when I had trouble following the descriptive text, I could look at the illustrations and figure out exactly what was going on. But I'm still not grasping how rebasing works or exactly what it does after having fully read the text and studied the illustrations for some time.

Among other things, the following has a section on rebasing with images:

  https://marklodato.github.io/visual-git-guide/index-en.html

There's also this:

  https://git-scm.com/book/en/v2/Git-Branching-Rebasing

Do those help at all?

Thanks for these links.

I've been reading more about rebasing from various sources over the past few days (I can't remember specifically from where) and I think I'm understanding it better. In fact, the book that I initially said totally lost me while it described rebasing in the introductory chapter goes into much further detail in the next chapter or two.

I think I've done enough research into Git to feel at least comfortable enough to try it out. And if I can handle it, I may end up making the switch (for future projects) from Mercurial to Git.

Thanks again, ewemoa!

Just to muddy the waters here a bit, it looks like a new desktop version of git is coming, promising "the same, native experience on OS X and Windows operating systems":
desktop.github.com (https://desktop.github.com/)

This looks interesting, but looks like it is specifically for Github. Not for Git in general. I don't use Github for my own repos because they don't allow private repos for free. That said, I signed up anyway because I do have a github account and I do follow/star/watch many repos on Github, and I'm kind of a fan of the whole gist (version controlled pastebin) (http://gist.github.com/) thing.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 13, 2015, 12:15 AM
Good luck :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: wraith808 on July 22, 2015, 09:01 AM
There's a new one from axosoft in beta - GitKraken (http://www.gitkraken.com/).  From the blurb they give on that page, I don't see what's so different, so I'm not trying it out.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on July 22, 2015, 04:45 PM
I tried working on a project and got so sidetracked trying to get git to work the way I wanted to that I moved the project to Mercurial so I could actually work on the project instead of spending all my time fiddling with git.

What I've ended up doing is being productive using Mercurial, then when I get to a place where I'm ready for the cloud builder to make a test build for me, I copy all the files over to a separate git repo to add/push the changes to let the cloud do its job.

I probably just need more time to force myself to learn the git tools, but right now I'm finding it really hard and frustrating to do things that are so easy and natural for me to do using Mercurial's tools.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: ewemoa on July 23, 2015, 12:54 AM
It's nice that there are tools to import / export :)

I didn't find it easy to get used to git -- certainly took a number of iterations.  In the end knowing about the guts a bit was helpful, but it's not the kind of thing one may enjoy hearing about when all one wants to do is work on one's code...
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Armando on July 23, 2015, 01:30 AM
I found that for most day to day code work, it's pretty straight forward (committing stuff, creating branches, merging branches, rebasing, stashing, squashing, blaming, etc.). Especially with a nice gui. But then, I didn't use the more advanced functions that much.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Tuxman on July 23, 2015, 05:12 AM
After years of using git, I really learned to love to use Mercurial for my unpaid hobby projects.
git sucks.
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on May 13, 2016, 04:13 PM
Came across gource (http://code.google.com/p/gource/) -- "a software version control visualization tool" -- anyone tried it out?

Sample videos (http://code.google.com/p/gource/wiki/Videos) and screenshots (http://code.google.com/p/gource/wiki/Screenshots) :)

I'm replying to a post made 5 years ago.

I recently re-discovered Gource and, seeing that I now have several Mercurial repositories I could test it out on, decided to give it a try.

Here's a video of one of my smaller projects, Be Tiny, World!:



It's kind of fun seeing the history visualized like that, and being able to remember what stage the project was in when certain files were added/edited.

The first few seconds (April 2012) are my Ludum Dare 23 submission (http://blog.deozaan.com/2012/04/23/be-tiny-world-released/). Then I ported it to Android (http://blog.deozaan.com/2012/05/04/be-tiny-world-v1-1-now-on-android/) (May). Then I improved the GUI a bit (February 2013). Then I added Google Play Games Services (Achievements/Leaderboards) (http://blog.deozaan.com/2013/09/16/be-tiny-world-v1-130915-0-released/), gave it a major graphical upgrade (http://blog.deozaan.com/2013/09/18/be-tiny-world-v1-130917-12-released/), and added a super easy "Kid Mode" (http://blog.deozaan.com/2013/09/22/be-tiny-world-v1-130921-14-released/) to the game (September 2013). Then I put it up on Itch.io (http://blog.deozaan.com/2013/11/07/be-tiny-world-now-on-itch-io/) (Octoberish). Then I added a Twitter Bot to tweet out about people playing (http://blog.deozaan.com/2014/04/13/be-tiny-world-v1-140413-16-released/) the game (April 2014). Then I added Immersive Mode (http://blog.deozaan.com/2014/11/07/be-tiny-world-v1-141107-17-released/) (on Android) and replaced a deprecated Google Play Games Services package with a new one (November). And that was my last update to the game. :)
Title: Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
Post by: Deozaan on May 13, 2016, 10:04 PM
I had fun with the last one, so I made another: