0

i try to make a new repository of my git's branch and the command that i used worked correctly but i can't see my files in my local

i use:

 git clone ssh://example@4234/path.git/

to make a repository of my git branches in my local, but i can't see the files of this branch. i know all the git command work correctly because i have this massage in git bash:

Everything up-to-date

do you know what is my problem and how can i fix it??

  • The branch is there "inside" the repository you've just cloned. Just `checkout` to it. The answer https://stackoverflow.com/a/59348663/7389293 below explains how to do it. – carloswm85 Dec 25 '21 at 08:16

1 Answers1

1

When you clone a repository using git, it selects the "main" branch from the remote repository and selects that branch for you locally.

The other branches from the remote repository are still available, they are just hidden. You can see them with git branch --remotes. To switch to your desired branch, use git checkout to checkout the remote branch.

Finally once you've checked out the branch you want, if it doesn't have all the changes you expect from the remote repository, run git pull to sync those changes locally.

Max L
  • 126
  • 2