0

Earlier today, I created a branch with a rather long, kebab-cased name and have come back to my computer later to realize maybe it was too long, as I dont really remember the exact order for the array of words chosen.

I dont see the branch as available on bitbucket because (i assume) it hasnt been pushed to and/or the upstream has not been set on it.

How can I retrieve it? is there any way to see a log of branch checkout activity?

I had already closed the terminal window wherein I cut the branch originally, so i cant find it by pressing thru terminal history.

if i knew some keywords of the branch, is it possible run

git grep

with some kind of parameters to find it?

Jeff Puckett
  • 28,726
  • 15
  • 96
  • 149
heug
  • 504
  • 1
  • 6
  • 16

3 Answers3

3

You can list all branches with

git branch -a

So maybe

git branch -a | grep keyword will help

Sylwit
  • 1,392
  • 1
  • 9
  • 15
0

use

git branch

it shows all local branch names.

Rahul
  • 1
  • 1
0

Using 'git branch' will list all your local branches. That probably will help you to remember the name of the branch you forgot.

saurabh.k
  • 1
  • 1