Reputation: 3
I've just picked up git bash today and I'm very confused, because I'm trying to learn how to use it. I spent at least half an hour looking for a solution on the internet, but without success, as I do not have any knowledge in implementing what I'm reading from other people's issues.
All I'm trying to do is is push an existing (local) repository from gitbash to github.
This is what github is telling me:
git remote add origin https://github.com/dorupopac/GITcourse.git
git branch -M main
git push -u origin main
All good until I put in the push line and what it does it basically just jumps to the next line without the "$" sign where I can type unlimited lines and nothing happens, instead of giving me the prompt to sign into gitHub. I tried pushing to "Master" branch as well, but nothing.Screenshot
Upvotes: 0
Views: 356
Reputation: 5650
Assuming that you already created an empty repository to the remote origin (https://github.com/dorupopac/GITcourse.git
). Then locally you should run the following git commands:
$ git init
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin https://github.com/dorupopac/GITcourse.git
$ git push origin master
Upvotes: 1