emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [PATCH 0/4] Adding orgtbl-to-orbtbl and cleaning orgtbl-to


From: Jason Riedy
Subject: Re: [Orgmode] [PATCH 0/4] Adding orgtbl-to-orbtbl and cleaning orgtbl-to-sqlinsert.
Date: Sun, 04 May 2008 23:34:15 -0700
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

And Carsten Dominik writes:
>> git://repo.or.cz/org-mode/ejr.git master
>
> Can you explain to step by step what I would have to do to
> pull these changes from your repository into a local branch in my own
> repository?  Thanks.

One long-term version is to add that repo as a named remote:
  git remote add ejr git://repo.or.cz/org-mode/ejr.git
Then you can update all your remotes in one go:
  git remote update
Or just grab one:
  git fetch ejr
If you want to remove that remote repo later, use
  git remote rm ejr
After fetching,
  git branch -r
should list the remote branches, including ejr/master, or
  git branch -a
lists all of the branches.

A short-term version is just
  git fetch git://repo.or.cz/org-mode/ejr.git master:refs/heads/ejr-tmp
to slurp it into a local ejr-tmp branch.  The typical
  git branch -D ejr-tmp
would delete that branch.  Note that for deleting branches
added via git remote, you need to pass -r to git branch as well.

The command
  git log -p --stat --color ..ejr/master
should give a pretty, colorized listing of the changes in
ejr/master and not in your current index.  Just
  git diff --color ..ejr/master
should give a colorized diff between your index and ejr/master.
You can base those off HEAD, i.e. HEAD..ejr/master, to see the
differences between your currently committed work and the named
branch (ejr/master).

The difference between HEAD and your current (unnamed) index
only matters if you've added changes to your index explicitly
(through git add) or implicitly (through a partial merge).
The "OUTPUT FORMAT" section of git-diff's man page (conveniently
also available as git diff --help) gives a list of which
sub-commands provide which diffs, in case you feel like poking
around to get a feel for how each level works.

Many of these work in various forms through Emacs and eshell, but
I admit I rarely use them directly from Emacs.  And git has many
more, newer gadgets that may be nicer.  The few simple tools fit
how I think well enough that I kinda stopped following the
improvements.

As an alternate method not using remotes, you could just save the
patches to an mbox (say ejr-silly-patches.mbox), create a branch,
then use
  git am ejr-silly-patches.mbox
to import the patches.  Some people prefer that method, and it
can make replying with corrections and requests a bit easier
if your mail reader can poke around individual mbox files.

And to save some digging in man pages and annoyance in the
future, applying a patch that adds files is easiest with
  git apply --index foo.patch
That option will add the changes, including new files, to the
index directly.  Then to see the differences before committing, you
need git diff HEAD.  Just using git apply does not update the
index and hence won't include the new files automatically, so
you'd need to find them and add them.

Jason




reply via email to

[Prev in Thread] Current Thread [Next in Thread]