{"thread":{"id":"47716","subject":"How juggle branches?","startedAt":"2018-01-29T21:31:19Z","lastAt":"2018-02-08T14:23:07Z","messageCount":4,"participants":["Andrzej","Patryk Obara","Stephen R Guglielmo"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"337704","messageId":"29b0272d-7854-592d-5e1c-3a4f0d347bd1@wp.pl","threadId":"47716","inReplyTo":null,"subject":"How juggle branches?","fromName":"Andrzej","fromEmail":"borucki_andrzej@wp.pl","sentAt":"2018-01-29T21:24:34Z","receivedAt":"2018-01-29T21:31:19Z","isPatch":false,"sender":{"key":"borucki_andrzej@wp.pl","avatar":null},"body":"First, I develop program which uses mysql in branch master.\nNext i change name this branch to before_hbase, and began develop HBase \nin branch master. I also develop before_hbase.\nNow, instead HBase will be MapR-DB which will before_hbase , not master \nsuccesor.\nHow do:\n- change before_hbase to master\n- old master to hbase\n- develop MapR in mapr branch\n?\nI am in master branch and am changing to hbase:\ngit checkout -b hbase\ngit push origin hbase\n\nnow worse:\nI am in branch before_hbase and need change to master\ngit checkout -b master  - not works because master exists\n\nI must use rebase? I hear, that rebase can be used only in private \n(.git), not github repositories.\nIf I change to master and copy files and next commit - change will not \natomic.\n"},{"id":"337769","messageId":"1fd71dd9-f54a-16dc-5521-f6f4e7d6fc33@gmail.com","threadId":"47716","inReplyTo":"29b0272d-7854-592d-5e1c-3a4f0d347bd1@wp.pl","subject":"Re: How juggle branches?","fromName":"Patryk Obara","fromEmail":"patryk.obara@gmail.com","sentAt":"2018-01-30T00:16:15Z","receivedAt":"2018-01-30T00:16:26Z","isPatch":false,"sender":{"key":"patryk.obara@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3967?v=4"},"body":"On 29/01/2018 22:24, Andrzej wrote:\n\n> I am in master branch and am changing to hbase:\n> git checkout -b hbase\n> git push origin hbase\n\nThese two commands create new branch called \"hbase\" in your local repo,\nand then in remote repo - so probably not what you wanted to do.\n\n> now worse:\n> I am in branch before_hbase and need change to master\n> git checkout -b master  - not works because master exists\n\n\"git checkout -b name\" creates new branch called \"name\", starting in \nyour latest commit and switches you to this new branch.\n\n\"git checkout name\" switches your working tree to branch \"name\".\n\nSo just drop \"-b\". You can read more in manual for git-checkout:\nhttps://git-scm.com/docs/git-checkout\n\n(in polish) Jeśli masz jakieś konkretne pytania, to możesz napisać do\nmnie po polsku :).\n\n-- \n| ← Ceci n'est pas une pipe\nPatryk Obara\n"},{"id":"338702","messageId":"131f3b0f-0002-2823-d64b-ffd16fff8dfa@wp.pl","threadId":"47716","inReplyTo":"29b0272d-7854-592d-5e1c-3a4f0d347bd1@wp.pl","subject":"Automatic parameters completion","fromName":"Andrzej","fromEmail":"borucki_andrzej@wp.pl","sentAt":"2018-02-08T14:03:44Z","receivedAt":"2018-02-08T14:03:46Z","isPatch":false,"sender":{"key":"borucki_andrzej@wp.pl","avatar":null},"body":"I have Linux Mint and its terminal besides usual completion (add file \nname when type first letter and press tab) also can complete git \nparameters. How is doing this? Bash knows git or bash has special \ninterface to completion and git uses it?\nI want in my Linux program apply this mechanism.\n"},{"id":"338703","messageId":"CADfK3RWXJyFWPUds1Q2qQS-w-Kwh8jKmO9VWCAgueo434LSYcg@mail.gmail.com","threadId":"47716","inReplyTo":"131f3b0f-0002-2823-d64b-ffd16fff8dfa@wp.pl","subject":"Re: Automatic parameters completion","fromName":"Stephen R Guglielmo","fromEmail":"srguglielmo@gmail.com","sentAt":"2018-02-08T14:22:59Z","receivedAt":"2018-02-08T14:23:07Z","isPatch":false,"sender":{"key":"srguglielmo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7794973?v=4"},"body":"On Thu, Feb 8, 2018 at 9:03 AM, Andrzej <borucki_andrzej@wp.pl> wrote:\n> I have Linux Mint and its terminal besides usual completion (add file name\n> when type first letter and press tab) also can complete git parameters. How\n> is doing this? Bash knows git or bash has special interface to completion\n> and git uses it?\n> I want in my Linux program apply this mechanism.\n\nVarious shells include support for completion of git parameters. These\ncompletion functions may be enabled by default in your distribution.\nFor example, zsh has vcs_info[1]. There are also scripts included in\ngit (contrib/completion) [2] to do this.\n\n[1] http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information\n[2] https://github.com/git/git/tree/master/contrib/completion\n"}]}