How to test a function using git?

I created the function a few weeks ago using git and worked a bit on it and had to stop. Now I want to start working on it again, but every time I use git branch -a to get the name of the available branches, I see it as

 remotes/origin/feature/upgrade-free-premium 

but when I run git checkout upgrade-free-premium , I get the following error.

 error: pathspec 'upgrade-free-premium' did not match any file(s) known to git. 

Can someone help me solve this problem?

+4
source share
3 answers

Try the following:

 git checkout -b upgrade-free-premium origin/feature/upgrade-free-premium 

In your case, the branch is remote. You need to specify which branch you want to check from: therefore, the correct name of the branch is origin/feature/upgrade-free-premium . This is because another origin may have the same branch name, so you need to specify the full name.

-b you must create a local branch to track the remote branch.

+5
source

Your branch is called feature/upgrade-free-premium ('/' may be part of the branch name).

Run git checkout feature/upgrade-free-premium .

+2
source

I assume that you have a function branch 1. git development check 2. git pull 3. git statement 4. git pull

0
source

All Articles