Showing posts with label GitHub. Show all posts
Showing posts with label GitHub. Show all posts

Saturday, October 31, 2015

GIT Work Flow



















  • Create an account in GitHub. Login to GitHub and create a new repository, say "TestRepo".
  • On your local computer, download Git.exe following the instructions at https://git-scm.com/downloads
  • On your local computer, create a folder, say "TestRepo".
  • Go to command prompt, change directory to TestRepo and C:\TestRepo>git init
  • This above command creates a ".git" folder in TestRepo folder.
  • Now create couple of files, test1.txt, test2.txt, in TestRepo folder.
  • C:\TestRepo>git add . (Note: after git add, a period is there, don't forget that)
  • The above command moves the files test1.txt, test2.txt to staging area.
  • C:\TestRepo>git commit -m "committing test1, test2 files"
  • The above command moves the files test1.txt, test2.txt to local repository.
  • C:\TestRepo>git remote add origin <https clone URL from github>
  • The above command connects to the github when you provide the correct username and password.
  • C:\TestRepo>git push origin master
  • The above command pushes your files from your local repository to github remote repository
  • C:\TestRepo>git pull origin master
  • The above command pulls the files from github remote repository to your local repository.
  • Happy programming!!

Sunday, June 1, 2014

6/1/14

Git & GitHub

Simple instructions for a beginner to set his code on GIT repo:
https://kbroman.org/github_tutorial/pages/init.html

Couple of good sites that I come across this week that have excellent explanation on Git and GitHub:
http://git-scm.com/book/en/Getting-Started-Git-Basics
http://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1#awesm=~oFT1fA8SbuXSlO

What is Git?
As per http://git-scm.com/  , Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. That's a cool one line explanation about Git.

Looking for a still simpler explanation?
Git is a version control application.

So what is GitHub?
GitHub makes Git easier to use by providing the visual interface and provides social network kind of environment for your projects on the web.