The branch you created locally does not exist in the remote library, so you will get an error. You can try to push it first to synchronize the local branch to the remote origin
When you create a new branch and switch to the dev branch, the code in the workspace is already the same as the master branch, and there is no need to pull it up remotely. You can develop on the dev branch now. After development, you can push it to the remote dev or merge it into the master.
fatal: Couldn't find remote ref master or fatal: 'origin' does not appear to be a git repository and fatal: Could not read from remote repository. You need to re-enter $ git remote add origingit@github.com :djqiang/gitdemo.git
1. When faced with more complex projects, git novices can refer to git flow to understand the meaning of master, develop, feather, fix and other branches and their merge order when submitting. 2. Your branch is only created in the local warehouse and has not been pushed to the remote warehouse. "fatal: Couldn't find remote ref dev", this error is that you chose to submit to local and remote at the same time. 3. If you are not familiar with git commands, you can use SourceTree.
Those who transfer from SVN must first understand the distributed version control idea of git. This is the power of git. Once you use it, you will know how cool it is.
The branch you created locally does not exist in the remote library, so you will get an error. You can try to push it first to synchronize the local branch to the remote origin
You can check the remote branch name
Maybe there is no branch called dev on the remote end
Or try
Only if the branch exists remotely, you can pull
If the branch does not exist remotely, you can directly
You can push the local branch to the remote end
When you create a new branch and switch to the dev branch, the code in the workspace is already the same as the master branch, and there is no need to pull it up remotely.
You can develop on the dev branch now. After development, you can push it to the remote dev or merge it into the master.
I’ll give you an article by Ruan Yifeng, which explains the scenes and strategies of branch management in simple terms
http://www.ruanyifeng.com/blog/2012/07/git.html
fatal: Couldn't find remote ref master or fatal: 'origin' does not
appear to be a git repository and fatal: Could not read from remote
repository.
You need to re-enter $ git remote add origingit@github.com :djqiang/gitdemo.git
1. When faced with more complex projects, git novices can refer to git flow to understand the meaning of master, develop, feather, fix and other branches and their merge order when submitting.
2. Your branch is only created in the local warehouse and has not been pushed to the remote warehouse. "fatal: Couldn't find remote ref dev", this error is that you chose to submit to local and remote at the same time.
3. If you are not familiar with git commands, you can use SourceTree.
Those who transfer from SVN must first understand the distributed version control idea of git. This is the power of git. Once you use it, you will know how cool it is.