In my school we have to create exercises based on API Rest. The repo is hosted on Github. We have each a subfolder and a branch to work on. However, when I wanted to try others exercises, the git checkout [branch]
didn't changed the branch and no error message was displayed. I had to move into the subfolder to checkout the branch and then add it to my local repo.
Can someone explain why is this happening ? It's not the first git project I work on but I've never seen this behavior.
And is there a way to fetch all branch at the same time ? I've looked here but except telling me that the repo is up to date it does nothing...
Update
I can checkout any branch from any subfolder, but not form the root folder of the repo. But if I checkout from the root for a undefined branch name, it returns error: pathspec 'asdkf' did not match any file(s) known to git.
. With a correct name it says and does nothing.