Recently i was working on side project on Django and then decided to put it on the github.
First of all you need to create a repository on github with same name as folder you want to put on git.
Then follow following steps :
Step 1: >> git init
Step 2: >> git add .
Step 3: >> git commit -m "setup commit"
above command will print list of all files.
Step 4: >>git remote add origin https://github.com/username/reponame.git
Step 5 : >> git push origin master
if error :
To https://github.com/navyad/pollsite.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/navyad/pollsite.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
then :
>> git pull origin master
Step 6: >>git push origin master
Its done , you can check the git repo.
First of all you need to create a repository on github with same name as folder you want to put on git.
Then follow following steps :
Step 1: >> git init
Step 2: >> git add .
Step 3: >> git commit -m "setup commit"
above command will print list of all files.
Step 4: >>git remote add origin https://github.com/username/reponame.git
Step 5 : >> git push origin master
if error :
To https://github.com/navyad/pollsite.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/navyad/pollsite.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
then :
>> git pull origin master
Step 6: >>git push origin master
Its done , you can check the git repo.