We are using Azure DevOps Git repo in our organization. We have recently started with GIT.
I have checked out one local branch named "feature-123". I did few changes which I committed to local branch. But I was not done with the feature development and I had to switch to some other urgent bug fix. For that, I checked out new local branch named 'bug-999' in which I want to handle the urgent bug. I fixed the bug and pushed "bug-999" to remote. But I see that my commits from the "feature-123" are also pushed.
So, commits in my first local branch are carried to the new local branch and when I pushed, they went all the way to remote.
Questions:
- How to handle this case?
- If I want to push a specific commit (excluding previous commits), how can i do that?