Prerequesites: Make a GitHub account and install git to your computer.
Windows and Mac users can download git here
Linux users can install git with sudo apt-get install git
git clone https://github.com/my_name/GitTutorial.git
Powershell users: New-Item myFile.txt
Bash users: touch myFile.txt
Now Edit the file by typing in their name and some fun fact about yourself
git status
git add myFile.txt
git commit -m “my first commit”
git push
Great! You just made your first push with git! Now, let's talk about branching.
git checkout -b mybranch
You can see what branches your repo has by typing git branch.
Now change something in your file from earlier and push it to the new branch.
git commit -m “new branch”
git push --set-upstream origin mybranch
Great! If you look at your GitHub repository, you should now have two branches: master and mybranch
git checkout master
git merge mybranch
git commit -m “merge to master”
git push
The changes you made should now be in the master branch.
Since your repository is a fork of someone else's repository, you can ask to merge your changes with their master!
You can do this on GitGub by clicking New pull request. Add a message and click submit, then I can accept and merge it!
Congratulations! You know git!