{"thread":{"id":"6553","subject":"Problems with branches","startedAt":"2007-01-26T23:51:07Z","lastAt":"2007-01-27T22:00:54Z","messageCount":6,"participants":["John Rigby","Johannes Schindelin","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"32785","messageId":"4b73d43f0701261551oef411f7tfd5cdbfdce7f6abc@mail.gmail.com","threadId":"6553","inReplyTo":null,"subject":"Problems with branches","fromName":"John Rigby","fromEmail":"jcrigby@gmail.com","sentAt":"2007-01-26T23:51:07Z","receivedAt":"2007-01-26T23:51:07Z","isPatch":false,"sender":{"key":"jcrigby@gmail.com","avatar":"https://gravatar.com/avatar/5230d30ff5be31ab7b262cdaaa16e31098c82383edb98f97c071661f7680e3f1?d=mp&s=160"},"body":"I'm having trouble doing something so simple that it is in the\ntutorial but for some reason it does not work for me.\nThe following script does basically the same thing that is\noutlined in the \"Managing branches\" section of the tutorial.\n\nmkdir foodir\ncd foodir/\ngit-init-db\necho bar > bar\ngit-add bar\ngit-commit -m \"Initial bar\"\ngit-branch mybranch\ngit-branch\ngit-checkout mybranch\necho bar2 >> bar\ngit-commit -a -m \"Added line bar2 to bar in mybranch\"\ngit-checkout master\ncat bar\necho bar3 >> bar\ngit-commit -a -m \"Added line bar3 to bar in master\"\ngit-commit -a\ngit-diff master mybranch\ngit-merge mybranch\n\nHere is the output, everything seems fine until the git-merge\nwhich complains \"fatal: Needed a single revision\":\n\n+ mkdir foodir\n+ cd foodir/\n+ git-init-db\ndefaulting to local storage area\n+ echo bar\n+ git-add bar\n+ git-commit -m 'Initial bar'\nCommitting initial tree ee314a31b622b027c10981acaed7903a3607dbd4\n+ git-branch mybranch\n+ git-branch\n* master\n  mybranch\n+ git-checkout mybranch\n+ echo bar2\n+ git-commit -a -m 'Added line bar2 to bar in mybranch'\n+ git-checkout master\n+ cat bar\nbar\n+ echo bar3\n+ git-commit -a -m 'Added line bar3 to bar in master'\n+ git-commit -a\nnothing to commit\n+ git-diff master mybranch\ndiff --git a/bar b/bar\nindex 77914eb..46ffc55 100644\n--- a/bar\n+++ b/bar\n@@ -1,2 +1,2 @@\n bar\n-bar3\n+bar2\n+ git-merge mybranch\nfatal: Needed a single revision\nUsage: /home/jrigby/bin/git-merge [-n] [--no-commit] [--squash] [-s\n<strategy>]... <merge-message> <head> <remote>+\n\nCould some kind soul help me pull my head out?\n\nThanks\nJohn\n"},{"id":"32786","messageId":"Pine.LNX.4.63.0701270059380.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6553","inReplyTo":"4b73d43f0701261551oef411f7tfd5cdbfdce7f6abc@mail.gmail.com","subject":"Re: Problems with branches","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-27T00:03:22Z","receivedAt":"2007-01-27T00:03:22Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 26 Jan 2007, John Rigby wrote:\n\n> I'm having trouble doing something so simple that it is in the\n> tutorial but for some reason it does not work for me.\n> The following script does basically the same thing that is\n> outlined in the \"Managing branches\" section of the tutorial.\n> \n> mkdir foodir\n> cd foodir/\n> git-init-db\n> echo bar > bar\n> git-add bar\n> git-commit -m \"Initial bar\"\n> git-branch mybranch\n> git-branch\n> git-checkout mybranch\n> echo bar2 >> bar\n> git-commit -a -m \"Added line bar2 to bar in mybranch\"\n> git-checkout master\n> cat bar\n> echo bar3 >> bar\n> git-commit -a -m \"Added line bar3 to bar in master\"\n> git-commit -a\n> git-diff master mybranch\n> git-merge mybranch\n\nWhat version do you run? I get this running your script:\n\n$ mkdir foodir\n$ cd foodir/\n$ git-init-db\nInitialized empty Git repository in .git/\n$ echo bar > bar\n$ git-add bar\n$ git-commit -m \"Initial bar\"\nCreated initial commit bca2eed2306297ec17abb5a9a9fd916f18bdd7f8\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 bar\n$ git-branch mybranch\n$ git-branch\n* master\n  mybranch\n$ git-checkout mybranch\n$ echo bar2 >> bar\n$ git-commit -a -m \"Added line bar2 to bar in mybranch\"\nCreated commit 48c9ce01b39faabc778bcc2ca52f44db54670809\n 1 files changed, 1 insertions(+), 0 deletions(-)\n$ git-checkout master\n$ cat bar\nbar\n$ echo bar3 >> bar\n$ git-commit -a -m \"Added line bar3 to bar in master\"\nCreated commit 496e810b70c3dba56d002ad9bec61028af7de821\n 1 files changed, 1 insertions(+), 0 deletions(-)\n$ git-commit -a\n# On branch master\nnothing to commit (working directory clean)\n$ git-diff master mybranch\ndiff --git a/bar b/bar\nindex 77914eb..46ffc55 100644\n--- a/bar\n+++ b/bar\n@@ -1,2 +1,2 @@\n bar\n-bar3\n+bar2\n$ git-merge mybranch\nAuto-merged bar\nCONFLICT (content): Merge conflict in bar\nAutomatic merge failed; fix conflicts and then commit the result.\n"},{"id":"32787","messageId":"7vfy9xtjxs.fsf@assigned-by-dhcp.cox.net","threadId":"6553","inReplyTo":"4b73d43f0701261551oef411f7tfd5cdbfdce7f6abc@mail.gmail.com","subject":"Re: Problems with branches","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-27T00:03:27Z","receivedAt":"2007-01-27T00:03:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"John Rigby\" <jcrigby@gmail.com> writes:\n\n> + git-merge mybranch\n> fatal: Needed a single revision\n> Usage: /home/jrigby/bin/git-merge [-n] [--no-commit] [--squash] [-s\n> <strategy>]... <merge-message> <head> <remote>+\n>\n> Could some kind soul help me pull my head out?\n\nProbably you are using v1.4.4.X.\n\nThe change to make git-merge accessible as the first level UI\nhappened during the preparation for the upcoming v1.5.0, and is\navailable only in v1.5.0-rc0 and newer versions (the latest is\nat v1.5.0-rc2).\n\nIf you replace \"git-merge mybranch\" with \"git-pull . mybranch\"\nyou should be Ok.\n"},{"id":"32788","messageId":"4b73d43f0701261608i15fda894k904df8c7263a58eb@mail.gmail.com","threadId":"6553","inReplyTo":"7vfy9xtjxs.fsf@assigned-by-dhcp.cox.net","subject":"Re: Problems with branches","fromName":"John Rigby","fromEmail":"jcrigby@gmail.com","sentAt":"2007-01-27T00:08:05Z","receivedAt":"2007-01-27T00:08:05Z","isPatch":false,"sender":{"key":"jcrigby@gmail.com","avatar":"https://gravatar.com/avatar/5230d30ff5be31ab7b262cdaaa16e31098c82383edb98f97c071661f7680e3f1?d=mp&s=160"},"body":"Doh!  Thanks, I didn't realize that this was a 1.5 thing.\n\nOn 1/26/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"John Rigby\" <jcrigby@gmail.com> writes:\n>\n> > + git-merge mybranch\n> > fatal: Needed a single revision\n> > Usage: /home/jrigby/bin/git-merge [-n] [--no-commit] [--squash] [-s\n> > <strategy>]... <merge-message> <head> <remote>+\n> >\n> > Could some kind soul help me pull my head out?\n>\n> Probably you are using v1.4.4.X.\n>\n> The change to make git-merge accessible as the first level UI\n> happened during the preparation for the upcoming v1.5.0, and is\n> available only in v1.5.0-rc0 and newer versions (the latest is\n> at v1.5.0-rc2).\n>\n> If you replace \"git-merge mybranch\" with \"git-pull . mybranch\"\n> you should be Ok.\n>\n>\n"},{"id":"32833","messageId":"20070127131355.GA2417@coredump.intra.peff.net","threadId":"6553","inReplyTo":"7vfy9xtjxs.fsf@assigned-by-dhcp.cox.net","subject":"Re: Problems with branches","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-01-27T13:13:56Z","receivedAt":"2007-01-27T13:13:56Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jan 26, 2007 at 04:03:27PM -0800, Junio C Hamano wrote:\n\n> Probably you are using v1.4.4.X.\n> \n> The change to make git-merge accessible as the first level UI\n> happened during the preparation for the upcoming v1.5.0, and is\n> available only in v1.5.0-rc0 and newer versions (the latest is\n> at v1.5.0-rc2).\n\nThis highlights a problem with the current web pages. The documentation\nat http://www.kernel.org/pub/software/scm/git/docs/ is for the current\nmaster (which is presumably where this user got the tutorial mentioning\n'git merge' as porcelain). But I suspect a lot of people will be using\nthe latest released version (either from the tarball, or a binary\npackage). We could:\n  1. Only re-publish the web doc at time of release\n  2. Build the published web doc from 'maint' instead of master\n  3. Publish (and clearly mark) both last-released and master doc\n  4. Disregard it; this particular release made a lot of UI changes, but\n     we're not likely run into this for most releases.\n\n-Peff\n"},{"id":"32881","messageId":"7vtzycgmeh.fsf@assigned-by-dhcp.cox.net","threadId":"6553","inReplyTo":"20070127131355.GA2417@coredump.intra.peff.net","subject":"Re: Problems with branches","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-27T22:00:54Z","receivedAt":"2007-01-27T22:00:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Jan 26, 2007 at 04:03:27PM -0800, Junio C Hamano wrote:\n>\n>> Probably you are using v1.4.4.X.\n>> \n>> The change to make git-merge accessible as the first level UI\n>> happened during the preparation for the upcoming v1.5.0, and is\n>> available only in v1.5.0-rc0 and newer versions (the latest is\n>> at v1.5.0-rc2).\n\nYou are right -- as you and other people noticed, this is\nprimarily my fault.\n\n> This highlights a problem with the current web pages. The documentation\n> at http://www.kernel.org/pub/software/scm/git/docs/ is for the current\n> master (which is presumably where this user got the tutorial mentioning\n> 'git merge' as porcelain). But I suspect a lot of people will be using\n> the latest released version (either from the tarball, or a binary\n> package). We could:\n>   1. Only re-publish the web doc at time of release\n>   2. Build the published web doc from 'maint' instead of master\n>   3. Publish (and clearly mark) both last-released and master doc\n>   4. Disregard it; this particular release made a lot of UI changes, but\n>      we're not likely run into this for most releases.\n\nThe ideal solution would be 3 but it would require some juggling\nto arrange git.txt -> index.html generation that happens every\ntime I push to kernel.org machine, so give me a bit of time and\nI'll come up with something.\n"}]}