Re: How juggle branches?

2018-01-29 Thread Patryk Obara

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


How juggle branches?

2018-01-29 Thread Andrzej

First, I develop program which uses mysql in branch master.
Next i change name this branch to before_hbase, and began develop HBase 
in branch master. I also develop before_hbase.
Now, instead HBase will be MapR-DB which will before_hbase , not master 
succesor.

How do:
- change before_hbase to master
- old master to hbase
- develop MapR in mapr branch
?
I am in master branch and am changing to hbase:
git checkout -b hbase
git push origin hbase

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

I must use rebase? I hear, that rebase can be used only in private 
(.git), not github repositories.
If I change to master and copy files and next commit - change will not 
atomic.