Getting things done with Git & GitHub on a PC (Windows 10)


A step by step guide to using Git & GitHub from your PC.

1. Installing Git

Install Git on your local machine.

2. Clone GitHub project to your machine

Go to the GitHub project and copy HTTPS link.

On your local machine at the comand prompt, go to the directory where you want this project to be under and type git clone followed by the HTTPS link.

For example:

git clone https://github.com/byteball/bot-example.git

This will create a new directory under your projects directory.

3. Make it your own.

Rename the new directory, e.g. MyNewProject.

At command prompt go to the new directory and remove git folder.

At command prompt run

npm install command to install required librarires.

If your project uses client / server structure run above command in those directories instead.



4. Create new Github repository & push 1st commit.

Login to GitHub and create a new repository.

Copy the URL.

At command prompt, go to your local project directory and create an empty git repository and connect it to the github:

git init
git remote add origin  REMOTE_URL

Than, make your 1st commit:

git add .
git commit -m "1st commit"
git push origin master

If you get fatal: not a git repository (or any of the parent directories): .git error, type git init to create an empty git repository in your local directory.