*I am trying to understand a scenario of being able to correct a user's 
mistake setting up branch, the scenario is a user created a branch tracking 
the wrong remote branch. I wanted to find the correct command to switch the 
local branch configuration (via command line) to track the correct branch, 
but am confused by the results I am getting. In my scenario I want to 
change the user's local rel_010115 branch to track the master branch 
instead of the remote release branch (rel_010115 that it is currently 
tracking) *

*So first I run to see the current state*

$ git remote show origin

* remote origin
  Fetch URL: hidden
  Push  URL: hidden
  HEAD branch (remote HEAD is ambiguous, may be one of the following):
    master
    rel_121214
  Remote branches:
    feature01  tracked
    master     tracked
    rel_010115 tracked
    rel_121214 tracked
  Local branches configured for 'git pull':
    master     merges with remote master
    rel_010115 merges with remote rel_010115
    rel_121214 merges with remote rel_121214
  Local refs configured for 'git push':
    master     pushes to master     (up to date)
    rel_010115 pushes to rel_010115 (up to date)
    rel_121214 pushes to rel_121214 (local out of date)


*Then I run the command*
$ git branch -u origin/master
Branch rel_010115 set up to track remote branch master from origin.

*To change the tracking of the rel_010115 to master*

*I then run again *

$ git remote show origin
* remote origin
  Fetch URL: hidden
  Push  URL: hidden
  HEAD branch (remote HEAD is ambiguous, may be one of the following):
    master
    rel_121214
  Remote branches:
    feature01  tracked
    master     tracked
    rel_010115 tracked
    rel_121214 tracked
  Local branches configured for 'git pull':
    master     merges with remote master
    rel_010115 merges with remote master
    rel_121214 merges with remote rel_121214
  Local refs configured for 'git push':
    master     pushes to master     (up to date)
    rel_010115 pushes to rel_010115 (up to date)
    rel_121214 pushes to rel_121214 (local out of date)

*I see that my pull has changed to master but not my push. What am I 
missing or misunderstanding?*

*Thank you*

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to