Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Feature branching workflow seems to update develop branch without permission.

martinapps May 20, 2017

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.

1 answer

0 votes
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2017

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).

martinapps May 26, 2017

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events