Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS
If I already know Mercurial and Darcs, should I take the time to learn Git? The posts here make Git seem complicated, but I would learn it if it has significant advantages over those other two.

Adbot
ADBOT LOVES YOU

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS

Thermopyle posted:

If you need it then learn it. If you're curious then learn it. It has its pros and cons compared to other DVCS systems.

I'm not sure what kind of answer you're looking for.

Oh, I don't need to learn it. I didn't really need to learn Hg or Darcs either, but doing so has improved my workflow compared to SVN, etc. I just want to know what Git has that Hg/Darcs don't have, to make the effort to learn it worthwhile.

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS
I usually recommend merges instead of rebasing. That way, each commit is a record of the context in which it was written, and the merge commits themselves are a record of the conflict resolution steps - or a record affirming that there was no conflict.

This may be because I started in Mercurial before Git.

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS
Learning Git isn't the easiest thing in the world, but there are two reasons you should:

1. It will pay dividends throughout your entire career of software development

2. You only have to learn it once. It's not like learning a programming language that gets new features every couple of years; learn Git once, know it forever. At least, that's been my experience.

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS

Vanadium posted:

I bet that's what they told people about why to learn svn.

Undeniably true!

That said, if something replaces Git, I'll eat my words. (Happily, too - I don't think Git is the best VCS, though it is very good. I prefer Mercurial's branching and UI.)

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS

nielsm posted:

Do anyone have a favorite tool to follow a git history along a specific branch, and easily view complete diffs for the changes? Preferably with a way to only view merge commits to the branch and commits directly on the branch.
(Use case: I have a few months of changes to a repository I'd like to review. Most are developed in feature branches.)

In general, the logging option you're looking for is --first-parent. https://stackoverflow.com/a/10248421

My favorite Git UI is Magit, which is an Emacs package. Using this, you can just hit l-l (lowercase L twice) and see the history of only the current branch, or l-o and type a branch name (with Tab to autocomplete) to see the history of a different branch. The --first-parent option is hidden by default, unfortunately, but you can set "transient" levels to reveal more advanced options like this one.

Adbot
ADBOT LOVES YOU

Tequila Bob
Nov 2, 2011

IT'S HAL TIME, CHUMPS
Has anyone here used Fossil? I'm liking what I read about it so far, and I might use it on some side projects to see how it goes. If anyone has any experience with it, or any major disadvantages to watch out for, I'm all ears!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply