* [PATCH] completion: --set-upstream option for git-branch
@ 2010-03-26 15:28 Michael J Gruber
2010-04-06 1:20 ` Michael J Gruber
0 siblings, 1 reply; 7+ messages in thread
From: Michael J Gruber @ 2010-03-26 15:28 UTC (permalink / raw)
To: git; +Cc: Shawn O. Pearce, Junio C Hamano
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 545bd4b..57245a8 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -797,6 +797,7 @@ _git_branch ()
__gitcomp "
--color --no-color --verbose --abbrev= --no-abbrev
--track --no-track --contains --merged --no-merged
+ --set-upstream
"
;;
*)
--
1.7.0.3.448.g82eeb
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] completion: --set-upstream option for git-branch
2010-03-26 15:28 [PATCH] completion: --set-upstream option for git-branch Michael J Gruber
@ 2010-04-06 1:20 ` Michael J Gruber
2010-04-15 10:56 ` Michael J Gruber
0 siblings, 1 reply; 7+ messages in thread
From: Michael J Gruber @ 2010-04-06 1:20 UTC (permalink / raw)
To: git; +Cc: Shawn O. Pearce, Junio C Hamano
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Bump...
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 545bd4b..57245a8 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -797,6 +797,7 @@ _git_branch ()
__gitcomp "
--color --no-color --verbose --abbrev= --no-abbrev
--track --no-track --contains --merged --no-merged
+ --set-upstream
"
;;
*)
--
1.7.0.4.552.gc303c
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] completion: --set-upstream option for git-branch
2010-04-06 1:20 ` Michael J Gruber
@ 2010-04-15 10:56 ` Michael J Gruber
0 siblings, 0 replies; 7+ messages in thread
From: Michael J Gruber @ 2010-04-15 10:56 UTC (permalink / raw)
Cc: git, Shawn O. Pearce, Junio C Hamano
Michael J Gruber venit, vidit, dixit 06.04.2010 03:20:
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> Bump...
>
> contrib/completion/git-completion.bash | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 545bd4b..57245a8 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -797,6 +797,7 @@ _git_branch ()
> __gitcomp "
> --color --no-color --verbose --abbrev= --no-abbrev
> --track --no-track --contains --merged --no-merged
> + --set-upstream
> "
> ;;
> *)
I don't mind if this is not used, but I'd at least like to get a "no".
Would someone please comment on this? Thanks!
Michael
^ permalink raw reply [flat|nested] 7+ messages in thread
* git branch --track to link existing local branch to remote?
@ 2010-05-25 19:40 skillzero
2010-05-25 19:53 ` Björn Steinbrink
2010-05-25 19:55 ` git branch --track to link existing local branch to remote? Joshua Jensen
0 siblings, 2 replies; 7+ messages in thread
From: skillzero @ 2010-05-25 19:40 UTC (permalink / raw)
To: Git Mailing List
Is there a way to link a local branch, which already exists, to a
remote branch without editing the git config file? I create a local
repository and committed some changes, created a remote repository,
added the remote to the local repository, and then pushed the local
branch to the remote. Now the local master points to the same commit
as origin/master. However, the branches aren't linked in the config
file so I can't just do git pull.
I know I can manually edit the config file (as the error message on
git pull says), but it seems like 'git branch --track master
origin/master' should do that automatically, especially if both
branches point to the same commit. It currently complains that the
branch master already exists and -f doesn't let me replace the current
branch. So what I've had to do is create a temp branch, switch to it,
do git branch -f --track master origin/master, and then delete the
temp branch. Is there a better way?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git branch --track to link existing local branch to remote?
2010-05-25 19:40 git branch --track to link existing local branch to remote? skillzero
@ 2010-05-25 19:53 ` Björn Steinbrink
2010-05-26 8:46 ` [PATCH] completion: --set-upstream option for git-branch Michael J Gruber
2010-05-25 19:55 ` git branch --track to link existing local branch to remote? Joshua Jensen
1 sibling, 1 reply; 7+ messages in thread
From: Björn Steinbrink @ 2010-05-25 19:53 UTC (permalink / raw)
To: skillzero; +Cc: Git Mailing List
On 2010.05.25 12:40:40 -0700, skillzero@gmail.com wrote:
> However, the branches aren't linked in the config file so I can't just
> do git pull.
[...]
> So what I've had to do is create a temp branch, switch to it, do git
> branch -f --track master origin/master, and then delete the temp
> branch. Is there a better way?
With git v1.7.0 or newer:
git branch --set-upstream master origin/master
Björn
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git branch --track to link existing local branch to remote?
2010-05-25 19:40 git branch --track to link existing local branch to remote? skillzero
2010-05-25 19:53 ` Björn Steinbrink
@ 2010-05-25 19:55 ` Joshua Jensen
1 sibling, 0 replies; 7+ messages in thread
From: Joshua Jensen @ 2010-05-25 19:55 UTC (permalink / raw)
To: skillzero; +Cc: Git Mailing List
skillzero@gmail.com wrote:
> Is there a way to link a local branch, which already exists, to a
> remote branch without editing the git config file?
git branch --set-upstream
Josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] completion: --set-upstream option for git-branch
2010-05-25 19:53 ` Björn Steinbrink
@ 2010-05-26 8:46 ` Michael J Gruber
0 siblings, 0 replies; 7+ messages in thread
From: Michael J Gruber @ 2010-05-26 8:46 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Shawn O. Pearce
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
On that note, I'm still wondering what's wrong with this one ;)
contrib/completion/git-completion.bash | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 545bd4b..57245a8 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -797,6 +797,7 @@ _git_branch ()
__gitcomp "
--color --no-color --verbose --abbrev= --no-abbrev
--track --no-track --contains --merged --no-merged
+ --set-upstream
"
;;
*)
--
1.7.1.345.g59eb63
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-26 8:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 19:40 git branch --track to link existing local branch to remote? skillzero
2010-05-25 19:53 ` Björn Steinbrink
2010-05-26 8:46 ` [PATCH] completion: --set-upstream option for git-branch Michael J Gruber
2010-05-25 19:55 ` git branch --track to link existing local branch to remote? Joshua Jensen
-- strict thread matches above, loose matches on Subject: below --
2010-03-26 15:28 [PATCH] completion: --set-upstream option for git-branch Michael J Gruber
2010-04-06 1:20 ` Michael J Gruber
2010-04-15 10:56 ` Michael J Gruber
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).