Saturday, June 11, 2016

Git and GitHub in 5 Minutes for Windows

Hi,

This is Git in Five Minutes for Windows

After this, you should be able to

  • Create a git repository on the command line
  • Add files for staging
  • Commit files
  • Push files to a remote, ex. GitHub

0. Download Git for Windows Here


https://git-scm.com/download/win


1. Configure Git












git config --global user.name "Full Name Here"
git config --global user.email "Full Email Here"


2. Creating a Git Repository















git init

3. Create a File, Stage and Commit It
















echo $null >> text.txt
git status
git add .
git commit -m "Initial Commit"

4. Create a Profile and Empty Repository on GitHub






















5. Get the URL from GitHub and Push Code to GitHub













git remote add origin url
git push -u origin master (you may be prompted for GitHub login + username)

See the file successfully on GitHub!

Future Steps


1. Learn what a branch is (the whole point of DVCS - distributed version control and Git!)
2. Learn what a fork is (the whole point of GitHub!)
3. Fork an existing open source project with an issue you can solve 
  • Pick a language, or learn a language! (JavaScript / C# / Java / C++ / C / whatever!)
    • If you don't know ANY programming, play around with this then take some "intro to programming" or "learn programming" course (preferably one that's fun)
  • Start small, change one line or handful of lines of code!
4. Commit and push your change to your own fork, then issue a pull request!

???

profit

Hope this tutorial was helpful

~ B























1 comment:

  1. GitHub has been a great way to improve and promote my iOS apps. I was wondering what other platforms are available to newbie developers like me?

    ReplyDelete