On 04/20/2015 07:12 PM, Adam Heath wrote:
I used to be in the same boat; in the early days, I would blame git for losing my work. "Damn you frigging piece of software!"

However, I also realized that the linux-kernel was using it to do much more complex things than I was, so I toiled on. It took me a long time, but I was finally able to figure out how to make use of git's features.

The main thing that keeps you from losing work, is to commit *everything* to git. If you leave *anything* in your $working_tree, not committed, then yes, sometimes things get confused. But once you have everything committed to git, there are certain things that git helps you with, with regard to keeping copies of stuff around.

==
# git config --global rerere.enabled true
# (echo adfadsfasdf; date) > new-file
# git branch before-new-file
# git add new-file
# git commit -m "This is my cool new file, yipee!"
# git log
# git checkout before-new-file
# git branch -f master before-new-file
# git checkout master
# ls new-file  # hmm, where did it go?
# git reflog # hmm, seems to show the commit from above
# git log trunk # commit is gone
# git log trunk@{1} # this shows the commit, and the file
==


Gah, too many git features. git rerere is a feature to cache rebase resolutions; the feature being discussed here is not the same thing.

This is just one of the powerful features that git has. I have rerere enabled locally, but don't use it often. I enabled it long ago, because I saw that it keeps copies of all my rebasing and branching, so that I can feel safer about having this safety net.

Also, I when back in time, and found an older copy of the previous ofbiz svn tree, and "underlayed" it into the current git-svn checkout, so I have git history going all the way back to 2003.

On 04/20/2015 02:53 AM, Adrian Crum wrote:
I don't agree that "all major contributors are using git."

Personally, I find Git to be an overly complicated solution to a simple problem. It frequently does bizarre things that no one understands, and you are left with things being mysteriously reverted for unknown reasons.

This isn't a -1 vote though. I'm just making it clear that I will be dragged kicking and screaming into using it.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 4/20/2015 5:38 AM, Hans Bakker wrote:
As discussed at apachecon in Austin, i propose to switch from svn to git
for the ofbiz repository. The main reason being that all major
contributors are using git and contributions are cumbersome, further,
git allows for better branching and merging.

Regards,
Hans


Reply via email to