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

Main Area and Open Discussion > General Software Discussion

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

<< < (35/39) > >>

ewemoa:
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.selenic.com/wiki/GitConcepts

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

Deozaan:
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:
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.)
-ewemoa (July 07, 2015, 01:05 AM)
--- End quote ---

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:
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:



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

wraith808:
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.
-Deozaan (July 07, 2015, 01:21 AM)
--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version