topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Monday March 18, 2024, 11:47 pm
  • 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 130421 times)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #75 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

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)

And then here are my personal favorites :

Pro Git

Git Reference (already mentioned by wraith808)

Git Ready

Git Magic


And then a lot of other useful stuff :

The official tutorial

The official manual

--

Everyday commands

Cheat Sheet

Git FAQ

Git for Computer Scientists

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

Mercurial and Git: a technical comparison


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? :)
« Last Edit: June 05, 2011, 10:59 PM by Armando, Reason: changed the second link\'s description »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #76 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.or.../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...?

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #77 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?

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #78 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://intermediawar...t-repository#more-17
http://stackoverflow...together-effectively
https://github.com/a...r/git-dropbox#readme
http://tumblr.intran...opbox-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.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #79 on: June 07, 2011, 07:49 AM »
^ I thought that might be possible; but I thought that was also what the (D) in DVCS 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?

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #80 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.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #81 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...

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #82 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.]
« Last Edit: June 07, 2011, 03:29 PM by Armando, Reason: \" in A, add a reference to B \" --- »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #83 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.)
« Last Edit: June 07, 2011, 10:06 PM by Armando »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #84 on: June 07, 2011, 11:25 PM »
Thanks for your help with this.  I'm going to try to set it up tomorrow.

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #85 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?

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,186
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #86 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.
« Last Edit: June 08, 2011, 06:40 PM by wraith808, Reason: replaced tortoise with git (oops) »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #87 on: June 08, 2011, 06:20 PM »
Thanks, that answers my question.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #88 on: July 08, 2011, 12:57 PM »
Some SmartGit 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...
« Last Edit: July 08, 2011, 01:06 PM by Armando, Reason: Added one more »

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #89 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 ?

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: DVCS ?
« Reply #90 on: September 12, 2011, 11:50 AM »
Another pretty good git Article : Git Is Simpler Than You Think

The article is well written. It gets "more" interesting from the The So-Called “Object Database” section.

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 #91 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:
  • Prepare a bare repository to be accessible via SSL + self-signed certificate

In SmartGit:
  • Project -> Clone...
  • Fill in the "Remote Git..." Repository URL with an https URL pointing to a repository available via SSL + self-signed certificate (e.g. https://example.com:4567/myrepos.git)
  • Click "Next"
  • Observe the following dialog box:

smartgit-server-certification-verification-failed.pngDVCS ? (All about Git, Mercurial-Hg and the like...)

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.

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 #92 on: April 21, 2012, 10:46 PM »
Strange. I'll see if I can test that tomorrow.

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 #93 on: April 21, 2012, 10:55 PM »
Thanks Armando, I appreciate it :)

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 #94 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
« Last Edit: April 22, 2012, 12:46 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 #95 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

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 #96 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)...

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 #97 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

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 #98 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...
« Last Edit: April 23, 2012, 11:15 PM by Armando »

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 #99 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 :)