I am a new Git user, I have used SVN for years and have just made the switch.
I'll try to summarise using the proper 'Git language': Can i safely merge un-pushed (i.e. only committed) changes from one local branch to another, and then push those commits on the new branch, in order to move the commits from one local branch to another?
Case:
There are 2 development branches, call them source_branch and dest_branch. source_branch is the main development branch being worked on by multiple engineers. dest_branch is a branch which has only my changes. Both were branched from master independently. I did some work on dest_branch, committed, and pushed back to the remote dest_branch. Then i switched to source_branch, made some changes, committed locally but did not push them back to the remote source_branch. It then became obvious that my change was more complicated than I thought; I no longer wanted to work on source_branch and i did not want to push anything up to the remote source_branch. I merged my local copy of source_branch onto dest_branch to try and 'move' the commits. Is this a bad idea? Should i have done something differently? When i try to delete my local copy of source_branch i get the following message:
warning: not deleting branch 'source_branch' that is not yet merged to '/origin/source_branch', even though it is merged to HEAD. error: The branch 'source_branch' is not fully merged.
I understand what it means - but I'm unsure if this come back to bite me later?