git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How juggle branches?
@ 2018-01-29 21:24 Andrzej
  2018-01-30  0:16 ` Patryk Obara
  2018-02-08 14:03 ` Automatic parameters completion Andrzej
  0 siblings, 2 replies; 4+ messages in thread
From: Andrzej @ 2018-01-29 21:24 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How juggle branches?
  2018-01-29 21:24 How juggle branches? Andrzej
@ 2018-01-30  0:16 ` Patryk Obara
  2018-02-08 14:03 ` Automatic parameters completion Andrzej
  1 sibling, 0 replies; 4+ messages in thread
From: Patryk Obara @ 2018-01-30  0:16 UTC (permalink / raw)
  To: Andrzej, git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Automatic parameters completion
  2018-01-29 21:24 How juggle branches? Andrzej
  2018-01-30  0:16 ` Patryk Obara
@ 2018-02-08 14:03 ` Andrzej
  2018-02-08 14:22   ` Stephen R Guglielmo
  1 sibling, 1 reply; 4+ messages in thread
From: Andrzej @ 2018-02-08 14:03 UTC (permalink / raw)
  To: git

I have Linux Mint and its terminal besides usual completion (add file 
name when type first letter and press tab) also can complete git 
parameters. How is doing this? Bash knows git or bash has special 
interface to completion and git uses it?
I want in my Linux program apply this mechanism.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Automatic parameters completion
  2018-02-08 14:03 ` Automatic parameters completion Andrzej
@ 2018-02-08 14:22   ` Stephen R Guglielmo
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen R Guglielmo @ 2018-02-08 14:22 UTC (permalink / raw)
  To: Andrzej; +Cc: git

On Thu, Feb 8, 2018 at 9:03 AM, Andrzej <borucki_andrzej@wp.pl> wrote:
> I have Linux Mint and its terminal besides usual completion (add file name
> when type first letter and press tab) also can complete git parameters. How
> is doing this? Bash knows git or bash has special interface to completion
> and git uses it?
> I want in my Linux program apply this mechanism.

Various shells include support for completion of git parameters. These
completion functions may be enabled by default in your distribution.
For example, zsh has vcs_info[1]. There are also scripts included in
git (contrib/completion) [2] to do this.

[1] http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information
[2] https://github.com/git/git/tree/master/contrib/completion

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-08 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 21:24 How juggle branches? Andrzej
2018-01-30  0:16 ` Patryk Obara
2018-02-08 14:03 ` Automatic parameters completion Andrzej
2018-02-08 14:22   ` Stephen R Guglielmo

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).