[haiku-development] Re: GIT help

  • From: Urias McCullough <umccullough@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 1 Apr 2013 14:41:10 -0700

On Mon, Apr 1, 2013 at 2:31 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>wrote:

> I revised the patchbay directory in my GIT tree, and reached the point
> where I decided to make a 'git diff patchbay'.  When I looked at it,
> though, I realized that I had added an rdef file to the directory
> (as well as deleting a couple of obsolete ones), so I did a 'git add .'
> and tried again.
>
> Now the diff file (which overwrote the nearly good one) contains
> *only* the rdef addition and the deletions.  All the essential stuff
> has gone!
>
> Before I screw things up further, can someone suggest how I
> can rectify things?  (I only did the add, no commit or anything.)
>
>
What you probably want to do is create a branch, commit your changes (which
includes any adds/deletes), and then use format-patch to create the diffs.

This allows you to create multiple logical changes with their own commit
message, and then format them into a large patch file for submission to the
official git repo.

There are plenty of "best practice" documents out there on how to use git
effectively - keep in mind you're working with an entire repository
locally, not just a working copy like SVN uses.

Other related posts: