Git/Github(Git Repository) and Basic Web Concept
Dec 12, 2014
Hello World! This is my first week in learning web development. I am exciting as my dog, Brian, when he heard the word "Cookie"!
Learning new thing could be intimidating experience but I found it facinating. I haven't been a best learner but I can tell you I have always big passion about learning a new stuff. I can say I am a professional learner.
As I learn more and more about web development everyday I would like to share with all of you about my progress. I hope that this will help many new learners and dreamers in web developing world!
Today's topic is Git / Github
First, what is git/github? It is a part of a version control system. Git and github are different but many use as interchangeable term. 'Git' is a program lives in your system(local computer) and help track the changes been made by using a terminal (or whatever command). 'Github' is a sister program lives in the network(internet) and collects every changes being pushed by local computers through 'git'. So they are same sisters but lives in different places. Essentially, GitHub and Git have a same goal - "Version Control". If you are working on a project and you are the only person working on the project at the same place(your computer) than version control doesn't mean anything for you (I will describe what version control is in the next question). When you need some sort of version control, you need some sort of system to track the changes in the project.
It is also worth to note that Github is developed as a side project of Linus. I mean you can imagine how big and how many engineers working for Linus project. They must have tons of people involved. They need some sort of system to control their master copy and changes they proposed. Github or any version control system will make sure that changes are tracked and verified before recognized as a master copy. Github also provide full traceability on every changes being made so anyone (with right permission) can retrive previous versions if things go wild. That's how github helps version control on a project.
So it is pretty clear that why many developers are using a version control system. Well, without a version contorl, developers must rely on very strict rules about how to propose and implement changes and store data. It is also requires to have structured security system to ensure who can access, edit and publish verified project. Lots of work for sure.
How does git control changes?
Simply, they protect an original copy, which is a verified and most up-to-dated version, and then add all the change with description and user id(git log).
- original - this is an original and the most perfect version of the copy
- Forked copy - this is on your page on github repo(repository). Baiscally, this is your own copy on github
- Cloned copy - You can clone the copy on your local machine and work with your favorite text editor.
There are several terminology you can learn. (Type: git --help) The most commonly used git commands are:
- Add - Add file contents to the index
- Branch - List, create, or delete branches
- Checkout - Checkout a branch or paths to the working tree
- Clone - Clone a repository from github into a new directory on your local machine
- Commit - Record changes to the repository
- Fetch - Download objects and refs from another repository. Wildly used for review request to peers
- Init - Create an empty Git repository or reinitialize an existing one
- Log - Show commit logs
- Merge - Join two or more development histories together
- Pull - Fetch from and integrate with another repository or a local branch. Pull is great function to check all repos are up-do-dated
- Push - Update remote refs along with associated objects
- Reset - Reset current HEAD to the specified state
- Status - Show the working tree status
Why use GitHub to store your code?
Github can be used as repository of your project on different server. If something happens on your computer and server, github can be a backup source. Also it allows you retriving any previous versions if things go wild.
13 Dec, 2014
What is Internet?
There are plenty of good places explains about internet. I found this 5 mininutes vidio clip explains the best about How The Internet Works
Basically, internet is a 'wire' that connects other computers. Unless you have a super computer or sort, most of devices are connected through ISP(Internet Servie Providers).
What is Web Browser?
A program(desktop software like Chrome) that allows you browsing a web and enjoy other fantastic stuff
What is DNS?
Domain Name System that works like yellowpage. Apparently there is a issue with DNS delaying that it takes up to 24 hours for new web address becomes available. When a browser request a website, the ISP send a request to DNS to look up the record of the website. Because they want to reduce the web traffic and time to show the website, they generally copy DNS record. That's called "cashing". Mostly, cashing process works great (it makes web search faster!) but when there is a new website was not in that particular copy of DNS, you are scrwed. You can't access it. Generally they are updating the copy within several hours so don't worry, it will eventually let you go sarahkwak.com
What is Domain name and IP address?
Those are same thing but in different language. Domain name is English name for IP address, which looks like 64.233.191.255 - good luck with remembering them. So they give something more memorable and make sense name like google.com or youtube.com
Different between website and web app?
Web app: The key word is "Interaction". Web apps are the basement works of website (presentation). It includes all programs makes dynamic interaction between server and database. Website is the final product of web apps. In general, website can be composed by simple HTML, CSS and maybe Javascript.
What is www?
World wide web is a program allows to sharing information, red and interact with other computers through a web browser.