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
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'
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?
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.
Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot