VERSION CONTROL COURSE
INI file format:
"INI" is short for initialization. INI files are used by the Windows operating system, typically to lay out operating instructions for the OS and some programs. EXAMPLE: Usually the instructions to the computer that enables the use of a mouse are stored .ini files.
VERSION CONTROL SYSTEMS 5
A VCS doesn't work by saving complete copies of each new version: it works by saving only the changes. This is useful for getting the latest version of a document, as well as getting any version in the document's history. Software developers often have the need to revert a program's code to the "last working version." Comparing this "working version" to the current "broken" version makes bug-fixing easier.
Fork:
A copy of a repository. You can fork a repository and make changes to it without affecting the original project. Forks are commonly used to recommend changes to projects belonging to someone else or to utilize someone else's project as a starting point for your own. EXAMPLE: You can fork a repository on GitHub.
VERSION CONTROL SYSTEMS - CONTINUED 3
After the developer has created a sub-branch which is named uniquely from the master branch, the files may be altered and improved. In a version control system, each file in the local repository will have an associated file history attached to it. This history is updated with a short description and timestamp each and every time the file undergoes changes in which the developer has committed these changes to their local repository. If the developer feels there are mistakes in a particular file, they may pick a save point on the file's history timeline and revert this file back to the condition as it was at that exact moment of time.
Working directory:
Also called "current working directory (CWD)," "current directory" and "working tree." The directory you are currently working in as a developer. EXAMPLE: In the following file path, the working directory would be "Docs": C:\Windows\Docs\Letter.docx
Branch
An independent timeline of project files
Hash:
An operation that converts one value to another. It is usually used to mask data with different data. EXAMPLE: The original file name could be orangepants.docx and the hash could be absdfmoijgfsdnsadf. Both would point to the file.
BASH:
Bash is short for "Bourne Again Shell". A command-line user interface for Unix. A command language is a programming language made up mostly of commands that are mainly used for communicating with operating system of a computer. Bash is a shell and a command language. Users can type commands that cause actions in the bash.
Add
Files to the repository working set
GITHUB
Later on in the program, you will be adding various code and projects to GitHub, which is why the Version Control Course comes before the main coding courses on the program. One of the primary benefits of maintaining a GitHub profile is to create a sort of development portfolio for yourself that other developers and potential employers can view. Though it's not common, some Tech Academy graduates have even been offered employment opportunities by people who happened upon their GitHub profile. It is wise to list one's GitHub profile on their résumé.
Check out
Retrieve a set of established project files to work on
THE USES OF VERSION CONTROL
Sometimes it is beneficial to save different versions of the same document. Anyone familiar with Microsoft Word has probably seen or been involved in document names such as CollegeEssay_1.docx or CollegeEssay_2.docx or Essay15FINALVERSION.docx. When you get into software development, where there may be hundreds or thousands of changes in a software's life-cycle (the creative process of software from start to finish - planning, development, testing, etc.), this quickly becomes unsustainable. A Version Control System (VCS) solves this problem, among many others.
Tracked file:
The files that were last saved. Tracked files are files that Git knows about. Untracked files are everything else — any files in your working directory that were not saved and are not in your staging area.
Source code:
The set of computer instructions that make up a computer program, in such a form that a computer programmer can modify the instructions. Source code is the version of a computer program as it is originally written (i.e., typed into a computer in a programming language) by the designer of the program. Normally, when the programmer is done making the program, he has the computer convert the code he wrote the program in (the "source code") to another format that is easier and faster for the computer to use. In that new format, the program can't be easily understood by people - but it is very useful to the computer. It also can't be modified by other developers at that point. EXAMPLE: Open-source software means developers can access and customize the source code of the software.
GIT AND GITHUB:
Unix is an open-source and extremely popular operating system created in the early 1970s by the technology company AT&T. GIT is a Unix-based version control system software that uses special commands typed into a command line module. GIT provides the tools necessary for the developer to manage local repository of files on their local hard drive. GitHub is a file repository hosting service that provides tools to share project files with other registered members of the community. GitHub also provides automated solutions to assist with file versions being committed by several users occurring at the same time. The GitHub Desktop Application is a version control system that bridges the gap between the tools already built-in to the GitHub website and provides the user with a visual solution to easily manage their repository files on both their local hard drive and the remote GitHub server.
Commit
Update the repository master branch with the current the file state
GitHub:
GitHub is a popular web site owned by Microsoft. It can be used to store source code, accomplish version control on that source code, track defects in that source code and manage work tasks for the computer programmers working on that source code. EXAMPLE: As of 2018, GitHub was the largest host of source code in the world.
Note:
When you use the command, "git init", the current location within your file system will be assigned as a local git repository. So you will want to be sure to use this command with a project folder you have created specifically for your project files. If you have created and initialized the "myResume" project folder while you were following along with this tutorial series. (Step 60 at about 3:34) Then this is your project folder. In this video, we will create and initialize another Git project folder and named it "myProjects" just as a review. You should not actually need to create and initialize multiple folders as local Git repositories, this was just a review so that you would have more practice with the process. We realize that you have not had much practice yet using Git so it is perfectly understandable if you are still a little confused. Please discuss this with your instructor if you are still feeling a little confused about what Git repositories are or need a little assistance navigating to your Git initialized folder.
Version control
is tools and software that are used to monitor and manage the various versions of electronic files, as they're being worked on.
Working Set
the current state of locally stored projects files not yet added to the master repository
Check in/out:
"Checking in" code refers to adding the changes you made to a set of computer code into the code that is being managed by a version control system. Conversely, "checking out" code mean marking a certain part of the code that is being managed by a version control as being subject to modification. That section of code can then be managed by the version control system in such a manner that the system acts to prevent conflicts that could be caused if another person wanted to work on that exact same section of code simultaneously to your work on it. Checking in is sometimes referred to as "committing" code. EXAMPLE: If you were working with a team of two other developers on a computer program that tracked the students in a school, and you wanted to work on the part of the code that calculated grade point averages, you might "check out" that section of code. The version control system would then mark that section of code in some way, and could notify the other two developers that the section of code has been checked out should they attempt to change it.
.docx file format.
"Docx" is short for "document XML." XML is extensible markup language. This means that developer can create their own document structure, and then use XML to specify markup instructions for the data in those documents. Tags are the markup language words that usually has two parts, a start tag and an end tag. They have these symbols before and after them: < and >. XML is similar to HTML except that the code itself can be customized (i.e. the developer can create their own tags). The .docx file format is what Microsoft Word documents are typically saved as (previously, Word used .doc). EXAMPLE: If you attempted to open a .docx file in a program that doesn't support Word document formats, you would either get an error message or a scrambled document.
BEST PRACTICES
"Imperative" means "relating to a command or a request." Imperative mood refers to a verb (word describing action or state of being) which gives a command or makes a request. In the sentence: carry the wood to the pile, "carry" is given in an imperative mood. But if we said: I am carrying the wood to the pile, "carrying" would not be in an imperative mood. It is recommended that commit messages are written with an imperative mood and with explanatory text. For example, the following would be a good commit message: "Fix bug." "Fixes bug" or "fixed bugs" would not be. Writing clear commit messages in the imperative mood is considered the best practice because it matches up with commit message generated by commands like git merge and git revert.
VERSION CONTROL SYSTEMS - CONTINUED 6
A Version Control System also makes team development possible, even with remote team members. With a centralized "repository" of document changes, developers can easily download the "latest" version and edit it. Once done, they just "check it in" to this main repository for the other team members to view and edit. Of course, having two developers work on the same document can cause problems. Version Control Systems utilize two distinct methods for enabling this type of collaboration. The first solution is to enable a developer to "lock" a file being edited. In other words, while the file is being edited, no other team member can edit it. Others can download it and view it, but none can make changes.
Network backbone:
A backbone is a part of computer network that interconnects various pieces of network, providing a path for the exchange of information between different sub-networks. This is part of a computer network that connects various sections of the network. It provides a path for information exchange between the various networks integrated into it. It is essentially a "senior" network containing a high capacity connection that forms the main link to various "junior" networks. EXAMPLE: If several offices were connected to a network, the network backbone would be the main link connecting all of the offices. If this connection was a wireless connection, one would say, "Our company uses a wireless network backbone".
Software suite:
A collection of computer programs that typically perform similar functions. These computer programs usually share a similar user interface. EXAMPLE: One of the most popular software suites is Microsoft Office 365. It includes several programs, including Word and Excel.
Touch:
A command-line interface program for Unix that is used to update date information - such as: changing the date that a file or directory was modified or accessed. Touch can also be used to create or open a file. EXAMPLE: You could type "touch dogstory.docx" in the Git command line to create a blank Microsoft Word document entitled "dogstory."
Command-line option:
A command-line option or simply option (also known as a flag or switch) modifies the operation of a command; the effect is determined by the command's program. In many CLIs, these options are written by typing a hyphen, followed by the desired option (or switch). EXAMPLE: the command "ls" tells the computer to list the files in the current directory. Adding the switch "-lS" will modify the command so that the list of files is sorted from largest file size to smallest. That command and switch would look like this: ls -lS
Repository
A designated container of folders monitored by the VCS
Directory:
A directory is something (such as a book) which contains listings of information in an organized manner. Technically, a folder and directory are the same thing. The only difference is that folder refers to a visual representation of a directory. Meaning, folders are icons representing a directory in the computer. EXAMPLE: Your written documents could be stored in one directory while your pictures could be stored in another. The root directory is the first or top directory in your computer. The root directory for Windows is: C:/Windows
Branch:
A duplication of code or a portion of it, so that changes can be made to it without affecting the original code. The purpose of branching is to allow a developer to edit a copy of the code without affecting the original code. Typically the developer later "merges" the branch - which means they integrate their edited code back into the original code. This is as opposed to simply editing the original version of the code. One of the benefits of branching is that it allows one to explore a different approach to solving a computing problem through writing code, while not stopping development work on the original code. EXAMPLE: If a developer wanted to explore an alternate method for sorting a large collection of financial records, they could create a branch of the original code and work on that alternative sorting approach while they, or other developers, continued to do other work on the original code. Then, when they had perfected the new approach to sorting the data, they could merge the changes they made back into the original code, which now had additional functions due to the continued work on that original code.
VERSION CONTROL SYSTEMS - CONTINUED 4
A file on one particular branch may be modified and thus it will contain different data than that very same file on another branch since they are no longer on the same plane of reality. Think about those popular science fiction novels or films concerning time travel. The time traveler may have gone back to a special point in time and made an alteration but the new future is not the previous future to the time traveler anymore as there was a new branch in time generated as soon as the time traveler had made their alteration in the timeline. Every successive change they may make will also make new branches in their reality accordingly. Luckily for developers, the VCS software will remember each and every change for them and associate a brief but concise description, explaining each change made so that all the developer has to do is read through these brief descriptions to help them determine the point in time they would like to revert the file back to.
Repository:
A main location where data can be kept and handled. A repository is the central location where code for a particular program is stored. EXAMPLE: There are online repositories to store one's code.
OneDrive:
A service provided by Microsoft for storing files online. EXAMPLE: You could back up your hard drive on OneDrive and share the data with other people.
Git:
A specific example of version control. Git is a popular version control system. You can use Git to manage the versions of your computer programs and work on programs in conjunction with other developers. Git is itself a computer program. A computer programmer can install the Git program on their computers, and then use that program while creating software and websites. EXAMPLE: Git is free software, and is used by millions of computer programmers around the world.
Shell:
A type of program that provides a user interface between the user and the operating system. You can use the shell to locate files, start and stop other programs, etc. Some shells provide a graphical interface, where visual objects on the screen are used to represent the files and programs on the computer. Other shells provide a text-only interface. EXAMPLE: You might use a shell to look at all the files in one section of your computer.
VERSION CONTROL SYSTEMS - CONTINUED 2
A typical business scenario for a team of developers working together on a particular project, would be for the main project files, known as "MASTER" repository files to be cloned (copied) to a developer's local hard drive so that they may work with these files whether they are connected to the remote hard drive or not. Before a developer will make any changes to their copied files, they typically will make a new "BRANCH" of all the copied files in the local repository. This creates all new versions of the original copied repository files. Essentially, these may be thought of as new instances of the files. Developers make new branches of the project files so that any new changes are not actually affecting the original state of these files on the original branch. The original branch containing the original master file is referred to as the "Master Branch" while any additional branches are considered, "Sub Branches".
Version Control:
Also called source control or revision control. Version control is the tools and processes that are used to manage multiple versions of computer files as the files change over time. A version control system, or VCS, provides two primary data management capabilities. It allows users to 1) lock files so they can only be edited by one person at a time, and 2) track changes to files. When you create things using your computer you often revise them over time. This can mean the creation of documents, graphic images, computer programs and other items. Keeping track of the changes to these items over time is called "version control." It also includes the control of changes to items like this when more than one person can make changes to the items. A version is an exact snapshot of something at a specific point in time. If you wrote a song, that would be Version 1. If you later added bagpipes over the top of the song, that would be Version 2. Version control is managing different versions of things on a computer. This is used a lot when you are creating computer programs. EXAMPLE: If a team of writers were preparing a large textbook, and each writer could add, edit and remove content to the textbook at any time, they would find a version control system valuable to keep track of all changes as the textbook was written.
Project:
An undertaking that typically has exact requirements and specifications. Projects are usually created following a plan. Within code editors (programs that developers use to write their code) websites and programs are typically saved as projects. EXAMPLE: If you were creating a portfolio website to showcase your accomplishments as a developer, the code for this site would be referred to as, and saved as, a project.
PURPOSE OF THIS COURSE:
Keeping track of the various stages of a software program as it is created is vital. Imagine that you've been working on a programming task and you suddenly realize you've taken the wrong approach. You will want a way to get rid of the changes you made by reverting to an earlier version so you can go back to before you tried that approach. Version control allows this, as well as other valuable actions related to managing the sometimes lengthy and complex process of making software. The purpose of this course is to teach students the basics of version control. It is a vital tool for software developers, particularly when they're involved in a coding project that includes multiple developers. The ability to utilize version control is a skill that every developer must have and you will obtain that skill on this course.
Merge:
Merging is the action of combining various versions of a file or folder. In version control, it means to combine changes in files that exist in two or more different locations (or being handled by two or more developers). It is combining changes in data. EXAMPLE: If a developer wanted to explore an alternate method for sorting a large collection of financial records, they could create a branch (a duplication of code or a portion of it, so that changes can be made to it without affecting the original code) of the original code and work on that alternative sorting approach while they, or other developers, continued to do other work on the original code. Then, when they had perfected the new approach to sorting the data, they could merge the changes they made back into the original code, which now had additional functions due to the continued work on that original code. When the two sets of code do not merge properly, this is referred to as a "merge conflict." For an example: If you attempt to merge code stored on your laptop with source code elsewhere, but someone had made changes to the exact section of the code you had been working on, you might have a merge conflict.
VERSION CONTROL SYSTEMS
On this course you will learn about various Version Control Systems (VCSs). A VCS is a specialized software suite that is used to maintain and track multiple versions of project files, also known as "source control" or "revision control". VCSs consists of a repository where all of the project files are stored. This repository may be stored on the user's hard drive. Whenever this is so, these files are considered to be on a "LOCAL" repository. The original project files that are stored on another server's hard drive (such as online storage) so that others can also access the files are considered to be on a "REMOTE" repository.
Overhead:
The cost associated with something. In computers, overheads refers to the amount of work required of the computer to perform an action (such as running certain software). Overhead includes how much bandwidth is utilized, how much processing power is required, the amount of memory is taken up, etc. by a particular website, program, etc. EXAMPLE: In running a business, overhead includes rent cost, marketing expenses and payroll. Software-wise, Microsoft Word takes more overhead than Notepad.
VERSION CONTROL SYSTEMS - CONTINUED 7
The obvious problem with this solution is it slows development. Some programs have one file that is bigger and heavier trafficked than others. To stop production while one developer edits it seems a waste. Also, as has happened, what if the developer forgets to unlock the file or takes a long weekend? This is solved by the copy-modify-merge method. Any number of developers can download a file and edit it. When sending the edited file back to the server, the server checks if the file being sent is "up-to-date" with any changes that were sent before it. If it's "out-of-date", the server shows the developer which changes were made and forces the developer to integrate those changes into the current document. Usually developers aren't working on the same portion of the same document, so these are typically easy to integrate. The VCS known as Git, utilized through the Github interface, follows the copy-modify-merge method and has made it possible for software development to occur among'st hundreds of developers simultaneously. It has opened the door to "open-source software development" projects that have helped revolutionize the world of technology.
Staging:
The step prior to the commit process in Git. A staged file means that you have marked the file to be included in your next commit. Staging is basically a loading dock where you can determine which changes you will commit. You can perform actions in the staging area, such as temporarily storing your changes.
Tilde:
The ~ symbol. Pronounced "tilda." EXAMPLE: The tilde is placed over certain letters in some Spanish words as an accent, such as the word: señor.
Case-sensitive:
This refers to a programming language where capital and lowercase letters affect the syntax. Some languages allow you to write code no attention given to capitalization or lowercase letters, while others won't operate unless you write the code exactly. EXAMPLE: Python is a case-sensitive programming language. In Python, the following code would print Hello, World! on the screen (note: the only "code" in the following line would be print() - the text within the quotation marks is not code): print("Hello, World!") But if you wrote your code as follows, there would be a syntax error and the text wouldn't be displayed. This is because, in Python, the print command does not begin with a capital P: Print("Hello, World!")
Parse:
To break something up into its parts and analyze it. In computing, it means that the program code is analyzed and read. EXAMPLE: If you write code for a web site, the web server parses the code and then outputs the correct HTML code to the browser. Parsing can also refer to breaking up ordinary text. For example: Search engines typically parse search phrases entered by users so that they can more accurately search for each word.
Iteration:
To iterate means to say or do something again; to repeat something. An iteration is the act of repeating. Iteration means to go through a defined series of actions, repeating a certain number of times. Usually this defined series of actions is repeated a certain number of times, or until a condition is met. EXAMPLE: Computer programs are usually created in iterations: Coming up with a basic working version, reviewing the program for mistakes to correct and improvements to make, doing that work, and repeating. This can be continued indefinitely.
VERSION CONTROL SYSTEMS - CONTINUED
While a team of developers are working on a project together, it is important that no two team members are editing the same content at the same time. If this happens, it is possible for one person to accidentally overwrite the changes made by someone else. For this reason, version control allows users to "check out" files for editing. When a file has been checked out from a shared file server, it cannot be edited by other users. When the developer finishes editing the file, he can save the changes and "check in" the file, effectively releasing that file so that other team members can edit the file once more.