git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patryk Obara <patryk.obara@gmail.com>
To: Andrzej <borucki_andrzej@wp.pl>, git@vger.kernel.org
Subject: Re: How juggle branches?
Date: Tue, 30 Jan 2018 01:16:15 +0100	[thread overview]
Message-ID: <1fd71dd9-f54a-16dc-5521-f6f4e7d6fc33@gmail.com> (raw)
In-Reply-To: <29b0272d-7854-592d-5e1c-3a4f0d347bd1@wp.pl>

On 29/01/2018 22:24, Andrzej wrote:

> I am in master branch and am changing to hbase:
> git checkout -b hbase
> git push origin hbase

These two commands create new branch called "hbase" in your local repo,
and then in remote repo - so probably not what you wanted to do.

> now worse:
> I am in branch before_hbase and need change to master
> git checkout -b master  - not works because master exists

"git checkout -b name" creates new branch called "name", starting in 
your latest commit and switches you to this new branch.

"git checkout name" switches your working tree to branch "name".

So just drop "-b". You can read more in manual for git-checkout:
https://git-scm.com/docs/git-checkout

(in polish) Jeśli masz jakieś konkretne pytania, to możesz napisać do
mnie po polsku :).

-- 
| ← Ceci n'est pas une pipe
Patryk Obara

  reply	other threads:[~2018-01-30  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 21:24 How juggle branches? Andrzej
2018-01-30  0:16 ` Patryk Obara [this message]
2018-02-08 14:03 ` Automatic parameters completion Andrzej
2018-02-08 14:22   ` Stephen R Guglielmo

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=1fd71dd9-f54a-16dc-5521-f6f4e7d6fc33@gmail.com \
    --to=patryk.obara@gmail.com \
    --cc=borucki_andrzej@wp.pl \
    --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).