From: "John Rigby" <jcrigby@gmail.com>
To: git@vger.kernel.org
Subject: Problems with branches
Date: Fri, 26 Jan 2007 16:51:07 -0700 [thread overview]
Message-ID: <4b73d43f0701261551oef411f7tfd5cdbfdce7f6abc@mail.gmail.com> (raw)
I'm having trouble doing something so simple that it is in the
tutorial but for some reason it does not work for me.
The following script does basically the same thing that is
outlined in the "Managing branches" section of the tutorial.
mkdir foodir
cd foodir/
git-init-db
echo bar > bar
git-add bar
git-commit -m "Initial bar"
git-branch mybranch
git-branch
git-checkout mybranch
echo bar2 >> bar
git-commit -a -m "Added line bar2 to bar in mybranch"
git-checkout master
cat bar
echo bar3 >> bar
git-commit -a -m "Added line bar3 to bar in master"
git-commit -a
git-diff master mybranch
git-merge mybranch
Here is the output, everything seems fine until the git-merge
which complains "fatal: Needed a single revision":
+ mkdir foodir
+ cd foodir/
+ git-init-db
defaulting to local storage area
+ echo bar
+ git-add bar
+ git-commit -m 'Initial bar'
Committing initial tree ee314a31b622b027c10981acaed7903a3607dbd4
+ git-branch mybranch
+ git-branch
* master
mybranch
+ git-checkout mybranch
+ echo bar2
+ git-commit -a -m 'Added line bar2 to bar in mybranch'
+ git-checkout master
+ cat bar
bar
+ echo bar3
+ git-commit -a -m 'Added line bar3 to bar in master'
+ git-commit -a
nothing to commit
+ git-diff master mybranch
diff --git a/bar b/bar
index 77914eb..46ffc55 100644
--- a/bar
+++ b/bar
@@ -1,2 +1,2 @@
bar
-bar3
+bar2
+ git-merge mybranch
fatal: Needed a single revision
Usage: /home/jrigby/bin/git-merge [-n] [--no-commit] [--squash] [-s
<strategy>]... <merge-message> <head> <remote>+
Could some kind soul help me pull my head out?
Thanks
John
next reply other threads:[~2007-01-26 23:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-26 23:51 John Rigby [this message]
2007-01-27 0:03 ` Problems with branches Johannes Schindelin
2007-01-27 0:03 ` Junio C Hamano
2007-01-27 0:08 ` John Rigby
2007-01-27 13:13 ` Jeff King
2007-01-27 22:00 ` Junio C Hamano
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=4b73d43f0701261551oef411f7tfd5cdbfdce7f6abc@mail.gmail.com \
--to=jcrigby@gmail.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).