hi all! I had a problem creating a new branch and after go back to the previous:
I've created a new branch called dev_NP from my branch dev, after I've used dev_NP and the next commit are all of dev_NP.
on the website I see that all the old commit have both dev and dev_NP:
today I checked out my dev branch to continue to work in dev, but it mantained also the changes made in dev_NP, so I made some bad things with git reset git revert...
how can I do this in the right way?
thanks in advance
thanks steve!
but is right that when you create a new branch, in bitbucket website you see the label 'new_branch' also for the old commits and when you commit in the 'new_branch' you see also the label of the other branch?
Yes, it's because they are 'reachable' from that branch I believe. You'd have to ask the Bitbucket guys for more detail on that design decision :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That looks completely normal to me. The Bitbucket view should only show the branch alongside the commit if the commit is reachable from that branch - the only thing I can think of is that you did some kind of history modification (like reset to commit) but after you'd already pushed those commits, then you pushed them again? Hard to visualise how this view matches up since I can only see part of your BB list in the previous screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steve!
In my project I worked on the 'dev' branch.
after I've created a new branch called 'dev_NP' from the last commit of 'dev' branch.
after this, all the 'dev_NP' commits are referenced in the bitbucket website like the image that I posted, 'dev' and 'dev_NP'.
Today I decided to come back to the 'dev' branch and leave the 'dev_NP' branch, so I checkout the 'dev' branch, sourcetree told me that the actual branch was 'dev' but it mantained all the commits that I made in 'dev_NP'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, that doesn't sound normal - if you created a new branch dev_NP and checked it out, any new commit would have been associated with that branch, and checking out 'dev' again should have taken you back to the previous point in time. Can you show us a screenshot of SourceTree's graph?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think to advise you we need a clearer understanding of what it was you were trying to achieve - can you explain?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.