Problems with branches

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

 



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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]