It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
In some branch I made some changes, but didn't add them to the index.
Next I checked out a new branch to track a remote one and saw that the changes made while working on the first branch where still there. I would have expected them being discarded because now the local branch doesn't reflect the state of the remote branch.
Ok, but the problem is SourceTree has no option in de Checkout New Branch tab to discard/cleanup changes.
Git won't discard uncommitted files unless you explicitly tell it to. If the files that you changed are identical between the two branches (besides the uncommitted changes), Git will allow you to switch while keeping the changes (useful if you realized you were making the changes on the wrong branch, or just created a new branch for changes you were creating).
New files will always be kept as well, and Git should only complain if you try to check out a branch that has an indexed file with the same name/location.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreSupported 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 groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.