Reputation: 2395
JIRA created a branch for a feature I was working on, but I don't want it. I'd like to move all the changes I've made so far back to the master branch and simply remove the feature branch altogether. Can anyone help me?
Upvotes: 1
Views: 77
Reputation: 789
If I'm reading your log correctly, it seems all you need to do is a rebase/merge and you'll be good to go:
git checkout master
git rebase ANDROIDAPP-137-actions-are-slow
git branch -d ANDROIDAPP-137-actions-are-slow
If rebase doesn't work, do a merge instead.
For more on git branching check out the documentation on it.
Upvotes: 1
Reputation: 37742
First let's make sure what this is going to do:
ANDROIDAPP-137-actions-are-slow
to master
ANDROIDAPP-137-actions-are-slow
branchfirst get back to master:
git checkout master
now get the work from your branch; rebase onto that branch:
git rebase ANDROIDAPP-137-actions-are-slow
now your commits should be on both master
and ANDROIDAPP-137-actions-are-slow
branch, you can check with:
git log --all --graph --decorate --oneline
so you can remove the jira branch:
git branch -D ANDROIDAPP-137-actions-are-slow
and remove it remotely:
git push origin :ANDROIDAPP-137-actions-are-slow
Upvotes: 3