Github:
1. Click on "+" ,"new repository" to create a repository.
2. Give a name to your repository-"pushingafiletogithub"
3. Give a description to your repository-optional.
4. Initialize this repository with a README.
5. Click on "Create repository" button.
6. Copy the link of your repository.
a. Address bar or
b. Look for "HTTPS clone URL" to the right side of your
repository.click on the button provided next to it to copy the link to
your clipboard.
Computer:
1.Create a folder "datascience" on your desktop.
2. Create a sub-folder "toolbox" in datascience folder.
Gitbash:
cloning your repository:
1.Open gitbash from start menu.
Type:
2.pwd-to print working directory.
3.cd ~desktop/datascience/toolbox-to set your working directory.
4.git clone "
https://github.com/dheerulearns/pushingafiletogithub"
creating a file:
1.Open notepad
2.Write whatever content you want in it.
3.file>save as-"file.md" to the cloned pushingafiletogithub folder.
pushing your file:
1.cd pushingafiletogithub-to change directory to new folder.
2.git init- to initialize.
3.git add . -to add your file.
4.git commit -m "adding file to my repository" -to commit
5.git push origin master -to push your file.
a.Type username
b.Type password-nothing is visible just enter your password.
6.You are done check github to confirm.