error: src refspec master does not match any

From git branch it appears that somehow your local branch name is “origin”. You can rename the branch with -mv flag, like this: git branch -mv origin master After this git branch should show master đź™‚ Just to make sure the name is indeed the only thing that went astray, you can run git log and look at the last few commits – and compare … Read more

Difference between “git add -A” and “git add .”

This answer only applies to Git version 1.x. For Git version 2.x, see other answers. Summary: git add -A stages all changes git add . stages new files and modifications, without deletions (on the current directory and its subdirectories). git add -u stages modifications and deletions, without new files Detail: git add -A is equivalent to git add .; git add -u. The important point … Read more

What does ‘–set-upstream’ do?

To avoid confusion,recent versions of git deprecate this somewhat ambiguous –set-upstream optionin favor of a more verbose –set-upstream-to optionwith identical syntax and behavior. sets the default remote branch for the current local branch. Any future git pull command (with the current local branch checked-out),will attempt to bring in commits from the <remote-branch> into the current local branch. One way to avoid having to explicitly type –set-upstream / –set-upstream-to is … Read more

What does ‘–set-upstream’ do?

To avoid confusion,recent versions of git deprecate this somewhat ambiguous –set-upstream optionin favor of a more verbose –set-upstream-to optionwith identical syntax and behavior. sets the default remote branch for the current local branch. Any future git pull command (with the current local branch checked-out),will attempt to bring in commits from the <remote-branch> into the current local branch. One way to avoid having to explicitly type –set-upstream / –set-upstream-to is … Read more