I created a feature/A branch off develop. I did some coding in feature/A branch and decided to abandon that work. I changed my active branch from feature/A to develop, and I saw the work done (but not committed) in feature/A was present in the develop branch also. Does switching back to the parent branch imply an end-feature action request? I wanted to leave feature/A as an orphan branch that could then be deleted.
Hello! To keep that work in the old branch, you'll need to commit those changes before switching branches (you don't need to push them, but if you don't they'll only stay on your local machine). If you'd like to store the changes without commiting them, you can use the "Stash" button.
If you'd like to switch branches and discard all the changes you've made, just check the "Clean" box when switching branches (this will discard all of the changes you've made).
Thanks for the info. I was beginning to think I couldn't work with the Gitflow since I didn't understand how that happened. Now I'll go back to experimenting with it. But what happened to Git's normal action of not allowing a branch switch with uncommitted work outstanding?
Thanks for the tip. I didn't know about the Clean option; it's good to know.
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