Hi Konstantin,

Thanks for offering to help.

When I look at my "git branch -a" output I see the remote branches, so 
things make a bit more sense now. I deleted some local branches to "clean 
things up" but then managed to pull them back down from the remote repo. 
Also it seems I may have accidentally deleted "master", so I created a new 
one, but then pull down the remote/master.

I just deleted my local master so I guess I can merge the remote/master 
forward and that will become my new master?

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = g...@bitbucket.org:maxhodges/wre-website.git
[branch "#4"]
remote = origin
merge = "refs/heads/#4"
[branch "#4-2"]
remote = origin
merge = "refs/heads/#4"
[branch "new-product-detail-page"]
remote = origin
merge = refs/heads/new-product-detail-page
[branch "facebook-comments"]
remote = origin
merge = refs/heads/master
[branch "fix-search-label"]
remote = origin
merge = refs/heads/fix-search-label
[branch "fixed-livevalidation"]
remote = origin
merge = refs/heads/fixed-livevalidation


$ git branch -a
  #19-facebook-zorder-issue
  #4
  #4-2
  adding-fb-comment-count
  facebook-comments
  fix-search-label
* fixed-livevalidation
  new-product-detail-page
  ranking-widget
  revert-svpply
  remotes/origin/#1-google-analytics-jquery-tracking
  remotes/origin/#4
  remotes/origin/fix-search-label
  remotes/origin/fixed-livevalidation
  remotes/origin/master
  remotes/origin/new-product-detail-page

Here you can see (partially) how commits seem to apply to multiple branches 
(but the results are cut off in the log)
$ git log --all --oneline --graph --decorate
* f2cdb49 (HEAD, origin/fixed-livevalidation, fixed-livevalidation) fixed 
issues
| * 963706f (origin/fix-search-label, fix-search-label) fixed label 
position on
| * e061be1 fixed #21 firefox label issue
|/
* f917121 (origin/master, master, facebook-comments) changed main message
*   6f12bd2 Merge branch 'revert-svpply' into facebook-comments
|\

I guess I should avoid deleting local branches, to "clean up", if they were 
pushed to the remote repo, because they will just get pulled again someday?

I'm not sure how "origin" got named. It might be a bitbucket convention 
(our remote repo is on bitbucket). 

Any else obvious I can do to try and sort things out? I'm sure the tool 
works like it is supposed to, and the problem is that I don't understand it 
all well enough. I'm trying to get some training scheduled, but we have to 
keep working on our project meanwhile.

Cheers!






On Thursday, October 11, 2012 1:58:21 AM UTC+9, Konstantin Khomoutov wrote:
>
> On Wed, 10 Oct 2012 08:10:51 -0700 (PDT) 
>
>
> > I have a git repo with multiple "origin" branches. 
>
> Do I understand right that you have a configured remote named "origin" 
> (either by creating that repo via cloning, which created such a remote 
> automatically or by running something like `git remote add origin URL`), 
> and you do fetch from that remote so Git created the so-called "remote 
> branches" to track state of that remote repository for you? 
>
> If this is indeed the case, such branches are named "remote branches". 
> Yes, the name is confusing, but better stick to this universally 
> agreed-upon naming convension so everyone things about the same things. 
>
> > WHen I add a new branch and commit changes, it shows that each of 
> > these branches are identical, so it may be writing the commits to 
> > multiple branches. 
>
> Impoissible unless you commit using a tool which does something wicked. 
>
> Committing in plain Git only updates the HEAD reference and also an 
> appropriate branch reference, if HEAD points to a branch.  So it's 
> impossible to update several branches at one when doing a commit -- 
> only the currently checked out branch is updated (the most usual case) 
> or no branch at all (but ignore this for now). 
>
> Well, it's also possible to do anything by writing a post-commit hook, 
> but I also doubt this is your case. 
>
> Another possibility is that what you tell us here is not what you 
> actually do.  Note that Git does *not* touch remote branches unless it's 
> performing `git fetch origin` which is specifically meant to download 
> all the history from origin, not present in the local repo, and update 
> the remote branches accordingly. 
>
> > I think made I made some rebase mistake. 
>
> I cannot imagine a way in which rebasing might break something in a way 
> you describe.  Note that 
>
> > Is there anyway to sort this out, it doesn't work like it used to and 
> > its confusing. Or should I just delete the repo and start tracking 
> > with a new repo? 
>
> Start from pasting here the contents of your .git/config followed by 
> the output of `git branch -a`. 
>
> Next, paste the first handful of relevant lines of output generated 
> by running `git log --all --oneline --graph --decorate` 
> then commit to a branch (be sure to tell us which branch you committed 
> to) and then paste the output of that `git log ... --graph ...` once 
> again so we could naturally see what happened. 
>
> Otherwise we're condemned to do plain guessing. 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/V0tsDh8R_HwJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to