git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ram Rachum <ram@rachum.com>
To: git@vger.kernel.org
Subject: Using alternate working directory
Date: Sun, 22 Sep 2013 00:04:24 +0300	[thread overview]
Message-ID: <523E09D8.8090808@rachum.com> (raw)

Hi everybody!

I need some help with Git.

I'm making a script `gm` which lets me merge one branch into another 
without having either checked out. It works for some cases but not all. 
I'm trying to make it work for more cases.

I concluded that the best way to do it would be by using an alternate, 
temporary working directory instead of the repo itself.

This is my script:

     https://gist.github.com/cool-RR/6575042

Now, the problem is that when I try it, it gives these errors:

     git checkout-index: my_file is not in the cache and then error:
     my_file: cannot add to the index - missing --add option?

Anyone has any idea what to do?

P.S. I've also asked this on Stack Overflow, so whoever comes up with an 
answer can claim his 150 imaginary internet points on that question.


Thanks,
Ram.

             reply	other threads:[~2013-09-21 21:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 21:04 Ram Rachum [this message]
2013-09-24  4:27 ` Using alternate working directory Ram Rachum
2013-09-24  5:00 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523E09D8.8090808@rachum.com \
    --to=ram@rachum.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).