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

avatar image

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

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

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

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #150 on: March 27, 2014, 09:53:12 AM »
Thanks!

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,126
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #151 on: March 27, 2014, 10:27:12 AM »
A Note About Git Commit Messages 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).

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #152 on: March 28, 2014, 02:06:51 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.
« Last Edit: March 29, 2014, 04:10:17 PM by Armando, Reason: (English syntactic inconsistencies) »

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #153 on: May 09, 2014, 03:10:53 AM »
Just stumbled over what seems to be a very nice git book/tutorial available for free online.

http://www.vogella.c...als/Git/article.html


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #154 on: May 09, 2014, 06:48:32 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.

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #155 on: May 09, 2014, 07:43:08 AM »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #156 on: May 09, 2014, 10:55:53 AM »
 ;D

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #157 on: May 09, 2014, 09:06:52 PM »
Funny and sad at the same time!

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #158 on: May 10, 2014, 12:00:47 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #159 on: August 08, 2014, 06:18:26 AM »
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.

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #160 on: October 20, 2014, 03:46:00 AM »
Anyone knows any good git videos / talks?

I've seen https://www.youtube..../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.

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #161 on: October 20, 2014, 12:57:15 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #162 on: October 20, 2014, 05:40:23 PM »
Here are some of them:

Stimulated:
  Introduction to Git with Scott Chacon of GitHub

Relaxed:
  Getting Git

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #163 on: October 20, 2014, 06:00:20 PM »
Here's a list I put together 2-3 years ago in an earlier post : http://www.donationc....msg251306#msg251306

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #164 on: October 20, 2014, 06:11:44 PM »
Unfortunately no luck reaching the three under "Lots of screencasts/videos… Here are some interesting URLs with a few fun tricks"...

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #165 on: October 20, 2014, 06:19:56 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?

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #166 on: October 20, 2014, 07:13:32 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...
« Last Edit: July 06, 2015, 11:40:52 PM by Armando, Reason: Embarrassing mistakes »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,716
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #167 on: July 06, 2015, 10:25:23 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?


Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #168 on: July 07, 2015, 12:03:06 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. 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?

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,716
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #169 on: July 07, 2015, 12:51:02 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 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:

Selective Commit.png

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.


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #170 on: July 07, 2015, 01:05:23 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 -- 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.se...com/wiki/GitConcepts

(Please note specifically the section about Git's staging area -- section 2.2.)
« Last Edit: July 07, 2015, 01:15:07 AM by ewemoa »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,716
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #171 on: July 07, 2015, 01:21:18 AM »
I've been reading the Git tutorials from Atlassian. 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 to easily handle making/merging/closing branches for the Gitflow workflow (in Mercurial) and TortoiseHg 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...


Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,716
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #172 on: July 07, 2015, 01:23:24 AM »
On a side note, haven't read it recently, but at some point I found the following useful:

  https://mercurial.se...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


Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,126
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #173 on: July 07, 2015, 04:59:08 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). 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:

sourcetree_stage_lines.png

I use this a lot, since I have a tendency to do drive-by-edits :-[.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 8,406
  • "In my dreams, I always do it right."
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #174 on: July 07, 2015, 11:24:10 AM »
I've been using SourceTree to easily handle making/merging/closing branches for the Gitflow workflow (in Mercurial) and TortoiseHg 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.