I understand that similar topics have been posted on this site many times before. I read them and tried all the suggestions. Somehow, I still cannot successfully push the local code back to the "fork" in GitHub using Git Bash.
I "fork"ed a project, which is vlerdas-subscribe, in the GitHub by clicking the Fork button.
I cloned the fork into the current directory in my laptop using Git Bash (I gave my GitHub username while cloning)
I added some code to one of the project files.
I had problems when I used the command git push origin master while pushing the entire project to the "fork". Some nice person on this site told me that the current version of the Git bash has a bug -- (for https) it does not prompt for username and password. Therefore, I followed his advice and did the following; but I got "src refspec master does not match any. failed to push some refs to ..."
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git remote rm origin
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git remote add origin https://{username}:{password}@github.com/{username}/vlerdas-subscribe.git
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://{username}:{password}@github.com/{username}/vlerdas- subscribe.git'
I saw some suggestions to answer similar topics on this site; therefore, I tried those suggestions but nothing seems to work. I copied my command window below:
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git branch
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git show-ref
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git commit -m "Initial commit."
On branch master
Initial commit
Untracked files:
.bash_history
.dbshell
.eclipse/
.editix/
.m2/
.mongorc.js
.org.eclipse.epp.usagedata.recording.userId
.ssh/
.sysdb20/
AppData/
Contacts/
Desktop/
Documents/
Downloads/
Favorites/
Links/
Music/
NTUSER.DAT
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TM.blf
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000001.regtrans-ms
NTUSER.DAT{016888bd-6c6f-11de-8d1d-001e0bcde3ec}.TMContainer00000000000000000002.regtrans-ms
Oracle/
Pictures/
Saved Games/
Searches/
Tracing/
Videos/
Virtual Machines/
client.cfg
default-soapui-workspace.xml
nodejs_test/
ntuser.dat.LOG1
ntuser.dat.LOG2
ntuser.ini
ntuser.pol
soapUI-Tutorials/
soapui-settings.xml
vlerdas-subscribe/
workspace/
nothing added to commit but untracked files present
vhaiswjenlim@VACOLTJENLIM ~ (master)
$ git push origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://{username}:{password}@github.com/{username}/vlerdas- subscribe.git'
vhaiswjenlim@VACOLTJENLIM ~ (master)
$