topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Tuesday March 19, 2024, 2:18 am
  • Proudly celebrating 15+ 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 130443 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 #100 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #101 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #102 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 :) ).

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 #103 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #104 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 :)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #105 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, 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.

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 #106 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.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #107 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?

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 #108 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 ?

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #109 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 :)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #110 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?).  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



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...
« Last Edit: November 07, 2012, 08:14 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #111 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

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

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #112 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:

view-stash-in-smartgit.pngDVCS ? (All about Git, Mercurial-Hg and the like...)

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.

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 #113 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 !

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #114 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:

  • Working on feature A
  • Realize I need feature B
  • Stash feature A work
  • Implement feature B and test
  • Commit feature B and test
  • Apply saved stash to continue work on A

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

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 #115 on: December 17, 2012, 01:30 PM »
Never said thanks ...  :)
Will take a look at Magit.  :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #116 on: December 30, 2012, 05:53 PM »
This may be documented somewhere, but since it caught me by surprise...

I noticed that if:

  • there is a selection of files in the Files view of the main project
  • the File view has focus
  • a commit is initiated

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.
« Last Edit: December 30, 2012, 06:06 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #117 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

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

Based on:

  What's New in SmartGit/Hg 4?

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
smartgithg4-edit-commit-message.pngDVCS ? (All about Git, Mercurial-Hg and the like...)

joining commits
smartgithg4-joining-commits.pngDVCS ? (All about Git, Mercurial-Hg and the like...)

reordering commits via dragging and dropping
smartgithg4-drag-drop-reorder-commits.pngDVCS ? (All about Git, Mercurial-Hg and the like...)

In each case, this was for commits that have not been pushed (anywhere?) yet.
« Last Edit: January 19, 2013, 04:23 AM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #118 on: January 21, 2013, 10:31 PM »
Came across the following SmartGitHg docs:

  Modifying the History

Sections for:

  • Modifying the last commit
  • Merging the last two commits
  • Splitting the last commit into two
  • Modifying older commits
  • Merging and splitting older commits
  • Reordering commits

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.

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 #119 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.

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #120 on: January 30, 2013, 01:32 PM »
Rather surprising:

http://blogs.msdn.co.../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.

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 #121 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...

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #122 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
- carpe noctem

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #123 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?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: DVCS ? (All about Git, Mercurial-Hg and the like...)
« Reply #124 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! :)
- carpe noctem