I wanted to create a new branch from upstream. What I did are
$ git init
$ git clone https://github.com/nalam-nmef/LearnGitWithGithubFlow.git
$ git remote add upstream https://github.com/twentyTwo/LearnGitWithGithubFlow.git
then, to create a new branch from upstream
$ git checkout -b changes1 upstream/master
But in this point an error occurs. It says
fatal: Cannot update paths and switch to branch 'changes1' at the same time. Did you intend to checkout 'upstream/master' which can not be resolved as commit?
What I will do after that is pushing that new branch to my fork
$ git push -u origin changes1
That is, I always create a branch for a new change request locally. The branch is created from the upstream/master branch. Commit changes locally and push it to my fork. Then, create a pull request to the upstream master. But, I am getting the error in $ git checkout -b changes1 upstream/master
Whats the wrong with this? What is the best practice?