Home > front end >  git CMD Not Showing All Branches
git CMD Not Showing All Branches

Time:08-11

I am extremely new to git.

I am using Git CMD.

When I type git clone .... I am able to clone the repository successfully, but when I type git branch -a, it doesn't give me a list of all branches available.

What am I doing wrong?

My end goal is to use git cmd to switch branches.

This is what happens:

c:\users\username\projects>git branch -a

fatal: not a git repository(or ay of the parent directories): .git

CodePudding user response:

Git is installed on a "per project" basis. So each project will have it's OWN GIT repository. You need to be sure you are in the project directory you want to be in, and then issue your git commands IE:

c:\> cd c:\users\username\projects
c:\users\username\projects> cd my-project
c:\users\username\projects\my-project> git branch -a
  •  Tags:  
  • git
  • Related