use git! - General Discussion and Assistance - CHDK Forum supplierdeeply

use git!

  • 26 Replies
  • 10707 Views
*

Offline chr

  • ***
  • 138
  • IXUS 82 IS
use git!
« on: 15 / September / 2008, 14:13:49 »
Advertisements
I love timeouts

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: use git!
« Reply #1 on: 15 / September / 2008, 14:47:01 »
well, if you hadnt already explained to me why you wanna use git instead of svn in irc, i would have moved the thread to the trashbin, as it is just spam. but i will give you the chance to elaborate on why you want people (devs) to move to git :D

*

Offline chr

  • ***
  • 138
  • IXUS 82 IS
Re: use git!
« Reply #2 on: 16 / September / 2008, 08:05:25 »
Hehe,

the great hacker clicked the wrong button.

I would have moved the thread to the trashbin, too if that bastard doesn't stop ranting  :P :haha

I made my experience while we switched our projects from cvs to svn to git: git.dyne.org However, it's a bit sleepy because I hacked chdk the last weeks  :D

I have got the opinion, that git will give the chdk project a boost because there exists many branches, many hackers but only a few with write access to the svn server.

So you may move this thread to the developer zone. Here is some homework for you and we can continue the lecture in irc if anyone is interesting in trying git ;)

1. install git-core version > 1.5 and gitk
2. git-svn clone -s --prefix=assembla/ https://tools.assembla.com/svn/chdk
3. have a cup of coffee. This big download is only done once and you get all branches!
4. cd chdk
    gitk --all &
    git branch -a -v
    git log
    git log --stat
    git log -p



« Last Edit: 16 / September / 2008, 08:15:13 by chr »

Re: use git!
« Reply #3 on: 18 / September / 2008, 04:57:53 »
One of the best things about distributed version control systems is much easier and more intelligent branching and merging, which will probably be useful for a project like CHDK. Of course the other thing is local commits (especially useful if you have no internet temporarily).
Personally I prefer bzr (bazaar), but git may be a good choice also.

Just my opinion.


Re: use git!
« Reply #4 on: 24 / September / 2008, 16:25:49 »
Ah, stop this religion war. I saw 1.000.000+ line with a dozen of developers using windows, linux and othe OSes  projects running with SVN without problems. It works fine here, why change a running system?
« Last Edit: 24 / September / 2008, 16:29:02 by justme »

*

Offline chr

  • ***
  • 138
  • IXUS 82 IS
Re: use git!
« Reply #5 on: 25 / September / 2008, 05:54:40 »
Hello Justme!

Thank you for pushing this thread!  8)

It works fine here, why change a running system?
Because there is another system, which makes a better job!

But may I ask, why you call this a war? I made a (good) suggestion, offered my help to everyone who is interested.

Also u did not get the point at all. It's not about changing. They can coexist. May the projects source be trapped on a svn server, you can use git:

 * git-svn can pull from a svn server
 * git-svn can push your work to a svn server *)

and between that, git is very useful and supports your work, even when offline! **)


*) if you have write access there.
**) svn becomes 98% useless if there is no Internet, e.g. try "svn log"

Re: use git!
« Reply #6 on: 25 / September / 2008, 12:09:28 »
Because there is another system, which makes a better job!
Is there a GUI interface for git? Is there a visual interface for pre-merge operations and post-merge diff visualization?

*

Offline chr

  • ***
  • 138
  • IXUS 82 IS
Re: use git!
« Reply #7 on: 25 / September / 2008, 16:07:42 »
Is there a GUI interface for git?

Yes and no. For Windows user there is no TortoiseSVN like integration (and no kde kio plugin either). However, for editing, moving, copying, deleting files you use your $TOOLS (No need for "git mv" etc.). When you have done, you use "git diff", "git status" and decide what to do with the changes.
There are some gui tools listed on Git - Fast Version Control System

 * gitk: visualizes history of selected or all branches, diffs, search ... a must have. I heavy use that!
 * "git gui" comes with the git-core package. A simple GUI written in TK. You can review changes, diff, add, commit, push, pull. Can't say much about it since I don't use it.

The command line tools are very comfortable. All output is paged and optional in ANSI color. Also git-core comes with a bash completion setup:

"git di<tab> <tab><tab>svn/tr<tab>" :)

Finally there are web gui ... recently I saw a git in trac somewhere ...

Is there a visual interface for pre-merge operations and post-merge diff visualization?

pre-merge I'd like to say thats "git diff --stat svn/trunk", "git log .." or use gitk to find out whats new. If you do "git remote update" ("svn up") that does not change any of your local stuff! You decide what you want to go into your branch.

"git merge" offers different strategies: resolve, recursive, octopus, ours. The first one is the safe one, only performs if there are no conflicts. But usually the defaults works fine.

When there are conflicts, "git mergetool" guides you though the files and starts your 3diff editor on each.

If the merge is a mess, you can undo everything ... lets say before merging there are many possibilities you can do:
 * make a snapshot including local changes with "git stash"
 * make a backup of your branch "git branch sd1100_trunk.bak"
 * make a copy of the working dir with "git clone" and play in a 100% sandbox. When the result are fine, "git push" it back to the origin.
 * have a look, which "features" are not in your branch, yet: "git cherry -v HEAD svn/trunk"

Well, a "post-merge", when commited, is finally "git show", "git log" ... etc.

Instead merging, git offers:
 * git cherry-pick
 * git rebase
That's stuff for another lesson ;)
« Last Edit: 25 / September / 2008, 16:15:44 by chr »


Re: use git!
« Reply #8 on: 26 / September / 2008, 12:51:18 »
Sounds nice.

I'll keep an eye on it, so far I'm not using SVN to the maximum extent (like users, branching).

Also, I don't like consoles, I'm more productive with GUIs.

Re: use git!
« Reply #9 on: 01 / April / 2010, 20:07:09 »
Bump!

In order to avoid the mess of various uncommitted changes to the repository I gave distributed version control a go today. (To be specific: git) I didn't do much (git svn clone, branch with a few commits and a merge), but I think I'm already sold. I think it would be ideal for CHDK with all its variations and contributors without commit privileges.

 

Related Topics