Have you ever wanted to merge a working branch after a checkout to master but you suddenly forgot the name of your working branch ? then reach to your tasks manager or hit a "git branch -a " to check all the branches just to get even more confused ?
well i have a little tip for you !
let's say that this is your working branch
now let's head to the master branch using
"git checkout master"
and to merge our working branch we just need to use this command
what this does is that it refers to the previous visited branch as "-".
So basically it's like saying:
"git merge previousVisitedBranch"
ps:it works also with "git checkout"
*try it yourself ! *
Top comments (0)