Re: How juggle branches?
- From
Patryk Obara <patryk.obara@gmail.com>
- Date
- Jan 30, 2018, 00:16 UTC
- Message-ID
- <1fd71dd9-f54a-16dc-5521-f6f4e7d6fc33@gmail.com>
- 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