Getting Started with Git (and GitHub) on Windows
- Install https://git-for-windows.github.io/
- Create a GitHub account at https://github.com/
- Follow these instructions to generate an SSH key and add it to your GitHub account: https://help.github.com/articles/generating-an-ssh-key/#platform-windows
- Create a new GitHub repo using the drop-down in the upper-right of github.com or by visiting https://github.com/new and filling out the form
- In Git Bash, type
mkdir code; cd code; git clone git@github.com:YOUR_GITHUB_USERNAME/NAME_OF_REPO_YOU_JUST_CREATED; cd NAME_OF_REPO_YOU_JUST_CREATED
but replaceYOUR_GITHUB_USERNAME
with your actual GitHub username :-) and replaceNAME_OF_REPO_YOU_JUST_CREATED
with the actual name of the repo you just created at github.com/new - Using a text editor, create a file called
README.md
- Then in Git Bash, run
git add README.md; git commit "Initial commit. Added README."; git push origin master
And that’s it – congratulations! You’re now all set up with Git on your Windows machine, you have a code
directory where you can create Git repos that you add code to, and you’re officially an open source developer contributing code on GitHub!