Github How to use
--
In this guide I will walk you how to use Github. You will see the requirements for using GitHub
Step 1: Install git
Windows
For Windows follow this Guide to Install Git on Windows
Mac OS
For Mac OS follow this Guide to Install Git on Mac OS
Step 2: Register a GitHub account
To be able to use GitHub you need to create an account you need to register an account. To do so go to github.com/join and fill out his form:
Step 3: Create a local git repository
Go in your terminal to the folder where you want to create a git repository. Create it by executing git init
.
You will get a confirmation that looks like this: Initialized empty Git repository in
$yourFolder
Step 4: Add a new file to the repo
To add a file to the repository execute git add $filename
Replace $filename with the name of the actual file you want to add to your repository
Step 5: Create a commit
To create a commit execute git commit -m $commitMessage
Replace $commitMessage with a message that explains what you did here
Step 6: Create a new branch
To create a new branch execute git checkout -b $branchName
Replace $branchName with the name you want to give the branch your working on.
Step 7: Create a new repository on GitHub
Click on Create repository
. The confirmation looks like this:
Step 8: Push a branch to GitHub
To push the content of a branch execute git push -u origin $branchName
Replace $branchName with you wished branch