When I finished the Google homepage project, the instructors suggested I upload my project to the Odin Project's curriculum, which is housed on Github, so as to allow other students to view it. I looked around a bit at the instructions on how to do so, but it's a bit unclear to me. So, knowing that using a VCS (version control system) is an important part of being a developer, I'm jumping back over to Treehouse to take their Github Basics course. I've already started on it, and so far the course explained why it is that a VCS is a powerful tool for developers. Now it's time to learn how to actually use a VCS, like Github. I'm already somewhat familiar with Github, as my work is uploaded on my Github account (my Google homepage project), but I'm not an expert at it, so I'd like to remedy that.
The act of telling your VCS that a version is finished is called committing. VCS usually allow you to view and filter the full list of your commits. Git was invented by Linus Torvalds, who is also the inventor of the Linux OS. Linus invented git to organize collaboration on Linux. Linus still maintains the Linux kernel.
Version control systems can be distributed or centralized. If the repository is stored in one central location, the VCS is centralized. With distributed MVS, each user has a repository, which means that any user can work on the project without being connected to a central repository.
Github is very popular with developers, and it's like a social network for your repository. Your project can be shared and other people can contribute or comment on it.
Setting up a git repository.
We can set up a file, then run the git init command from inside of it, and git will install repository files for that file. You can verify this by running the ls -a command from inside of the file, and this will show any visible files in the folder, as well as the hidden git files which should now be in the folder as well (due to running git init).
The git add command (followed by the name of the file) adds all the changes in the file to the staging area.
rm -r .git, when inside the folder with the .git file inside it, will remove the git folder, but the -r (recursive) command is very powerful, so we should avoid using this unless we're absolutely sure we know what we are doing.
When inside of the project folder in the command line, in order to let git know that a certain file should be added to the repository, we must enter "git add" followed by the name of the file you want to add to the repository.
The git commit -a command tells git to commit all of the changes it can find in your project folder. Or, we can do git commit -a -m "Added change X" to include a message (the -m is for the message, which should be in quotes).
The git log command will show us a log of all of our commits. The command git checkout -b (followed by a branch name) will create a branch in that name and switch us to it. The command git branch (followed by the branch name) will create a branch, but will not switch us to that branch. The command git checkout (followed by the name of the branch) will switch you to the desired branch. The command git branch will output a listing of all the branches in the project and place an asterisk next to the one that you are currently on. The command git branch -D (followed by the name of the branch) will delete the branch named, but the command will not function if you are in the branch you want to delete. So, if that's the case, enter git checkout master to switch to the master branch, then enter the command to delete the desired branch.
SUMMARY OF CODING SKILLS
Total Treehouse Points: 4,010
Treehouse Points by Subject Matter: HTML 663, CSS 1,599, Design 1,193, Development Tools 522, and Miscellaneous
Treehouse Ranking (%): "You have more total points than 86% of all students."
Treehouse Badge(s) Earned Today:
Why Version Control Matters
Getting Started with GIT
Branches
Treehouse Courses Completed:
How to Make a Website
HTML
CSS Foundations
CSS Layout Techniques
Aesthetic Foundations
Design Foundations
Adobe Photoshop Foundations
Adobe Illustrator Foundations (in progress, about 66% complete, but ceased work on this, switched focus to front end and back end web development, as opposed to web design)
Codecademy (& other) Courses Completed:
HTML and CSS (Codecademy)
Design Foundations
Adobe Photoshop Foundations
Adobe Illustrator Foundations (in progress, about 66% complete, but ceased work on this, switched focus to front end and back end web development, as opposed to web design)
Codecademy (& other) Courses Completed:
HTML and CSS (Codecademy)
Books Read or in Progress:
Completed: "Head First HTML and CSS," by E. Robson & E. Freeman (37 pg preface and 710 pgs of actual content (as in, I'm not including the book's index))
My Progress on The Odin Project:
1. Introduction to Web Development 100% Complete
2. Web Development 101 25% Complete
3. Ruby Programming 0% Complete
4. Ruby on Rails 0% Complete
5. HTML5 and CSS3 0% Complete
6. Javascript and JQuery 0% Complete
7. Getting Hired as a Web Developer 0% Complete
Hours Spent Coding Today: 3.5
Total Hours Coding: 294.5
Total Hours Coding: 294.5
No comments:
Post a Comment