Web Development Basics Flashcards

1
Q

What does a Web Developer do?

A

A web developer’s job is very hands-on, and can vary wildly from person to person. Generally, a web developer’s job involves a lot of planning, building websites or web apps from the ground up, deploying them, and maintaining them by fixing bugs or optimizing the code.
In other words, a web developer plays the role of both an architect and handyman, but their work lives in the cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s the difference between web developers and web designers?

A

Web designers are focused on the artistic design and UX/UI of a website or web app, whereas developers are focused on how to build it, although there is some overlap between the two nowadays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s the difference between front end, back end, and full stack developers?

A

Front-end developers focus more on the actual webpage itself, how the site looks to the end user.
Back-end developers focus on the server side code that runs the application, usually they use programming languages like Python, Ruby, or Java.
Full-stack developers are responsible for both the front-end and back-end of the application.

Front-end developers are responsible for User Interaction.
Back-end developers focus on storing, delivering, and generating data for the front end.
A full-stack developer does all of these things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What’s the difference between static and dynamic web pages?

A

Dynamic webpages change depending on the user input and actions, because of this they also require a more complicated server.
Static web pages offer no dynamic changes and keep their content no matter the actions of the end-user.
Dynamic pages allows users to create, destroy, edit, and read data. The data persists even when the page is closed, unlike static pages which are reloaded each time a browser is refreshed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What’s the best way to get help when you get stuck?

A

The best bet to get help when you are stuck is to use Google! There are other fantastic resources but Google will give you great access to all of them.
A lot of times you will find your answer turning up on StackExchange.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What online developer communities can you join?

A

Start with IRC channels, subreddits, and various meetup groups in your specific area.
Look at r/Programming or r/learnprogramming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is it better to use a developer-friendly text editor like Sublime Text than something oriented more towards word-processing like Microsoft Word?

A

I think the most important reason why developer-friendly text editors are better than Word, is that editors such as Text Wrangler and Sublime Text save files in a proper format for Web Servers and Browsers. MSWord along with other word-processing programs tend to add additional information to files that Web Servers and Browsers do not understand.
Additionally, developer-friendly editors have features such as Code Coloring, basic code-hinting, File and Directory Management, and can be customized to be easier on your eyes when staring at them for hours.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the top 3 characteristics of great web developers?

A

Curiosity/creativity - The passion for creating/building and the hunger for learning new technologies.
Ability to think quickly and problem solve - Figuring out a solution to a problem construct on your feet and easily is a hallmark of a great developer.
Persistence - The developer world is fraught with obstacles and setbacks, but persistence will pave the way to success.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What do companies look for in a junior web developer?

A

Companies want developers who have built working code. They are looking for good portfolios which demonstrate talent and persistence. Passionate and committed developers who are able to communicate effectively and work on a team are in high demand.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the hiring process like for a developer?

A

To apply for a job, you’ll have to submit a resume, cover letter, links to your portfolio projects, and your Github page.
If the employer likes what they see, you will likely have a phone screen interview, through which the employer will get more information on your background and interest in the position (and also determine if you pass their baseline requirements).
If they bring you on-site, you will likely have a series of interviews, each with a different focus (behavior assessment, portfolio/code review, on-the-spot programming observation).
Every company’s different, but this is the sort of application process I would prepare for!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the internet?

A

Simply put, the internet is a global system of interconnected computers and devices, all communicating with each other via a common language (or standard protocol).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is information broken down and sent?

A

It is broken down into packets and sent through random different ways to get to their destination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are packets?

A

Packets are bits of data that are parts of a whole that are sent from one computer or server to another. An image, video or some other asset is requested by a client and the host serves them up by breaking it down into smaller chunks called packets that are sent out with information attached to them that signifies where they are to be routed and how to piece them all back together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a “client”?

A

With regard to the World Wide Web, the client is a user’s browser. When a user opens a browser on their computer, the browser waits for the user to take an action; depending on the action, the browser may make a request to the server, asking for a resource. Then, as long as there aren’t any errors, the server will respond with the requested resource. The browser then waits for another action from the user and the cycle continues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a “server”?

A

The server waits for requests from a client and tries to produce the proper response. If the server cannot properly respond to a request, it will respond with an error that attempts to help the client understand what went wrong (e.g., a 404 NOT FOUND response indicating a web server couldn’t find the requested resource).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is HTTP and how does an HTTP request work?

A

HTTP stands for Hypertext Transfer Protocol, which is the standard method used to request and transmit data across the internet. When a user enters a URL in their browser, the browser generates the HTTP request and sends it to the server, which also responds via HTTP to provides the data & files for the requested site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are DNS servers?

A

A DNS server is a special kind of computer that links human-readable names of web sites, such as www.google.com, to their actual IP address location.

For example, instead of typing www.google.com and asking a DNS server to look-up the address of google for you, you can simply enter http://74.125.224.72/ directly into your browser!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is HTML and how is it used?

A

Hypertext markup language, a language of tags used to define the structure and content of Web pages, such as headings, lists, paragraphs, line breaks, images,
etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is CSS and how is it used?

A

Cascading Stylesheets, a language that describes the look and style of the elements defined in an HTML document, such as fonts, colors, spacing, transparency, alignment,
and other design aspects of a page. In short, it makes the raw information look pretty, and it makes the front end simpler by separating presentation from content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is your browser’s Web Inspector (aka Developer Tools) and how can you use it to poke around in a page’s HTML?

A

The Web Inspector is a tool that allows you to view a web page’s source, the DOM hierarchy, debug Javascript, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What happens behind the scenes after you click “search” on google.com?

A
A single click rings out on a dark night...
Picoseconds later (a lot of them) later the input is received by a usb or other peripheral device port
Nanoseconds later (a pile of them)  a short string of integers is sent and interpreted by the CPU of device used as a "click".
Milliseconds later (a group of them) a command is sent to open up an http handshake
Microseconds late (a few of them) the handshake is confirmed and search query data is exchanged
Centiseconds later (a handful of them) the data is processed and the return data is exchanged
Decaseconds later (two point five of them, in this case) your search is returned to your screen.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the command line?

A

A terminal/shell that one opens and types in commands for various tasks (moving between directories, opening, editing files, removing files, changing settings and permissions, ,etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How do you open it on your computer?

A

Type cmd under Start > Run on Windows, or Command + Space, type terminal on OSX, then hit Enter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is Bash?

A

“Abbreviation for Bourne-Again SHell, the command-line shell for GNU/Linux.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How can you navigate into a particular file directory?

A

$ cd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

How can you create a directory?

A

$ mkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

How can you destroy a directory or file?

A

$ rm

$ rm -rf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

How can you rename a directory or file?

A

$ mv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Why are file permissions important?

A

prevent unwanted access and/or modification of files. Permissions often are for read, write and execute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

How do you view hidden files in a directory?

A

$ ls -a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

How do you find information about a particular command?

A

$ man

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is a “Superuser” and how do you execute commands as this user?

A

The “Superuser” is a user of a computer system with special privileges needed to administer and maintain the system. Superuser commands can be executed using ‘sudo’ in the command line, which stands for Superuser do.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is Vim?

A

Vim is an improved version of the vi editor that is included in most UNIX systems. Highly configurable it was built to enable efficient text editing which makes it quite useful for programming. Some even consider it an entire IDE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

How do you quit Vim if you get stuck in it?

A

:q
:q! (to overwrite and not save any changes)
:qa!
‘ZZ’ (the shortcut to exit Vim with saving the changes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

What is the .bash_profile file and what is it used for?

A

The bash ‘.bash_profile’ file is a startup file for the bash shell and is used for many things such as declaring the $PATH variable for login shells.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What is the $PATH variable?

A

The $PATH variable is an environmental variable in the GNU/Linux and other UNIX-like operating systems that tells shell which directories to search for executable files in response to commands issued by a user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Why might you need to add onto your $PATH variable?

A

You might need to add onto your $PATH variable so an application can be found and run in the command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What are alias commands?

A

Alias commands are shortcuts that can be set up for use with the command line. These are often set for convenience so things such as long scripts that are often repeated don’t need to be fully typed out.

For instance, when using Sublime Text, one may not want to always manually locate files and open them using the application. Instead, an alias can be set such as ‘subl’ which can be used in the command line preceding the filename. This opens the file in sublime text, voila!

i.e. ‘subl text.txt’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

URL( Uniform Resource Locator)

A

Address that one types in to reach a particular webpage. Human readable address that eventually gets mapped through DNS into actual IP addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Domain

A

The part of the URL which specifies the location of the web server who is going to respond to your request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

IP Address

A

IP addresses are the absolute address of a website. Four number ranging from 0 to 255 and separated by commas, these are unique but difficult to remember for the everday user - hence the creation of URLs and the DNS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

DNS

A

The Domain Name System, or DNS, is the phone book of the Internet. It takes human-readable URLs and translates them to IP addresses so that packets know exactly where to go.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

HTTP

A

HyperText Transfer Protocol, defines how messages are formatted and transmitted and what actions web servers and browsers should take in response to various commands. For example a URL request to retrieve a web page from a server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

HTTPS

A

HyperText Transfer Protocol Secure is the secure version of HTTP, and is basically HTTP wrapped in another layer, TLS / SSL.

HTTPS is used to prevent “impostor” and “man-in-the-middle” attacks, among others. Any submitted form data sent “over the wire” can be read very easily by a malicious user, so it is universally recommended that any sensitive information is transmitted via HTTPS.

45
Q

POP & IMAP & SMTP

A

POP stands for Post Office Protocol, IMAP for Internet Messaging Access Protocol,and SMTP for Simple Mail Transfer Protocol. These are set of protocols for handling email.

46
Q

API

A

API stands for Application Programming Interface, which is a set of programming instructions and standards for accessing a Web-based software application. Software companies typically release APIs to the public so that other software developers can design products that are powered by its service.

For example, Amazon.com released its API so that web developers could more easily access Amazon’s product information. Using the Amazon API, a third-party website can post direct links to Amazon products with updated prices and product descriptions.

47
Q

Web Server

A

A program usually running on a remote computer that responds to requests from a browser.

48
Q

Bugs

A

An error or defect in software or hardware that causes a program to malfunction. Typically coding issue, but has extended to other fields.

For example: From DARPA newsletter 6.11.2009 “Code compiled successfully (completed tier 1.6 of Google/Haliburton world takeover project), but during deployment we found several bugs where sample populations were still able to think and feel independently.

49
Q

The Cloud

A

Cloud computing is the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

50
Q

Cookies

A

A text file stored by the browser which is sent back to the server each time the browser requests a page from the server. Mainly used to identify users and possibly prepare customized web pages for them.

Session (or transient) cookies are stored in temporary memory and erased when browser is closed, they do not collect info on user. Instead, they store information in the form of a session identification that does not personally identify the user. Persistent (or permanent) cookie are stored on hard drive until it expires at expiration date or until user deletes it. They are used to collect identifying info about the user such as surfing behavior or user prefs for a site.

51
Q

404 Error

A

The HTTP Status Code returned by a server indicating file not found.

52
Q

SEO

A

SEO (search engine optimization) is the process of producing content that is:

  1. Interesting enough to your customers that they find it organically and choose it over competitive products.
  2. Interesting enough to the search engine provider to bump it up to the first page instead of competitive products.
  3. Tricky enough to pretend to be one of the first two by gaming the search algorithm.
53
Q

WYSIWYG

A

“What you see is what you get”. Often a GUI interface where the changes you make in your editor are nearly identical (in theory) to the changes you will see on your page.

54
Q

Responsive Design

A

Ensuring that all possible devices and browsers are capable of properly displaying the intended content including: very easy to read and navigate; minimum need for panning and scrolling; and no need to resize.

55
Q

Grid System

A

The design structure for building a web page. A grid system streamlines the web development workflow by serving as a visual guide on which designers can organize graphic elements on a page in relation to other graphic elements on the page or even other parts of the same element or shape.

Grid systems speed up the design process while making the web page more visually appealing, but are not mandatory. However, working without a grid system will require sizing every column on the page without any sort of guide, that will then need to be applied to every page manually.

Even though grids are not necessary to design a web page, they make the process much easier and better looking visually.

56
Q

RGB

A

Short for red, green and blue, the three colors that make up a pixel. Each is an integer between 0 and 255, and a combination of three integers specifies a color to display.

57
Q

Hex

A

Hexadecimal: a base-16 numeral system. Digits are 0-9, a-f. Example: Hexadecimal(1c) == Decimal(28). In the context of color, Hexadecimal is used to numerically represent Red, Green, and Blue content, using three pairs of digits. This allows 256^3 (over 16 million) unique colors. Color example: #00ff00 is Green.

58
Q

Above the Fold

A

Content that is visible immediately when the page is loaded, without having to scroll. Good design will place important elements here so the site’s visitors don’t have to scroll to find content. A reference to olde-tymey newspaper formatting, where headlines would be placed prominently above the physical fold.

59
Q

GUI

A

Graphical User Interface. This is the modern interface that is used across a multitude of computers and devices and allows a user to interact with the electronic device through graphics and indicators. Basically if it isn’t a text-based interface it’s a GUI. It is used as a generic term for a visual interface that the user can interact with.

60
Q

Front End / Back End

A

“Front End” refers to browser, and languages like HTML, CSS and JavaScript that work within the browser.
“Back End” refers to the server that hosts the web application, and frameworks like Rails that operate on those servers.

61
Q

HTML

A

The markup language which specifies the structure of all the pieces of a webpage.

62
Q

CSS

A

“Cascading Style Sheets” find HTML tags and tell the browser how to display them.

63
Q

Javascript

A

The scripting language that runs in the browser. It allows interactivity with the user. It is also invading the back-end with the popularity of nodejs.

64
Q

AJAX

A

AJAX stands for Asynchronous JavaScript and XML, and it is a programming concept used to enable web pages to exchange data with a server without the user having to refresh/reload the entire page. It allows for web applications to send and receive data in the background. A good example would be real-time updating of a twitter or facebook feed.

65
Q

Pseudo-Code

A

Basically shorthand for what you are planning to code. It’s like sketching for programmers.

66
Q

C

A

An older, light weight programming language that directly inspired the development of many other languages. It’s one of the lowest forms of programming language.

67
Q

Ruby

A

Ruby is the most enjoyable language on earth. Easy and happy to code.

Ruby is a dynamic, object-oriented programming language. Created by Yukihiro “Matz” Matsumoto who has said that “The goal of Ruby is to make programmers happy”.

68
Q

Ruby Gems

A

Ruby Gems are Ruby programs and libraries in a self-contained format called a “gem” packaged by RubyGems package manager, a tool designed to easily manage the installation of gems and a server for distributing them.

Part of the Ruby programming language, RubyGems is a package manager that makes it easy to download, install and run ruby programs and libraries (“gem”) and it’s files through a simple terminal command.

Essentially, a gem consists of two things: code and a gemspec (specifications for that gem) which is then used by rubygems to handle the management of the code.

Most gems are open source, and used in most applications. The majority of gems provide command line utilities that can automate tasks and speed up your work.

69
Q

Frameworks

A

A framework is a platform where common code with generic functionality is ready to be used by developers along with possibility to write custom code.

70
Q

Ruby on Rails

A

Ruby on Rails is the amazing web framework for creating awesome web applications. If you want to live on edge, RoR is the right choice.

71
Q

Command Line

A

The interactive shell where you can enter commands that will be run by your operating system. Also useful for navigating your file system.

72
Q

Version Control

A

It’s like a time machine for jumping back and forth between specific time stamp for coding.

73
Q

Git

A

One of the most popular open-source version control systems.

74
Q

Open Source

A

Free licensed code.

75
Q

CMS

A

CMS stands for Content Management System, which is an application used to manage the content of a website. The purpose of a CMS is to make updating a website’s content easier, enabling administrators to make changes efficiently without the need for coding expertise.

76
Q

Database

A

A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. They cornerstone of every web application. This is where everything your users do is saved. Like a giant collection of giant spreadsheets that moves really fast.

77
Q

SQL

A

Abbreviation of Structured Query Language, and pronounced either see-kwell or as separate letters. SQL is a standardized query language for requesting information from a database. The original version called SEQUEL (structured English query language) was designed by an IBM research center in 1974 and 1975. SQL was first introduced as a commercial database system in 1979 by Oracle Corporation. Although there are different dialects of SQL, it is nevertheless the closest thing to a standard query language that currently exists.

78
Q

XML

A

Extensible Markup Language (XML) is a text-based format that allows for the structuring of electronic documents and is not limited to a set of labels. XML is used to describe data. The XML standard is a flexible way to create information formats and electronically share structured data via web services on the public Internet.

79
Q

Script

A

Magic invocation, which could be casted by mage in a matter of a minutes. Don`t need tough preparations and internisation. You could write spells in .rb files and than order your Ruby individual to cast it.

80
Q

Why did you need to install Ruby?

A

As we might recall, back-end programming means coding on the server side. Since not all servers run the same programming languages we need to make sure we install in our computer the same language. When we install Ruby we are actually installing the Ruby interpreter which allows us to “run” our code locally so we can make sure that our Ruby programs will be executed correctly by our server.

81
Q

Why didn’t you need to install HTML, CSS and Javascript?

A

These are already native to the browsers and do not need a compiler or back end to interpret. They can also be authored in a simple text editor.

82
Q

What is RVM and how will it be useful later?

A

RVM stands for Ruby Version Manager and is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.

RVM is helpful because some gems, tools, and frameworks may only work with a particular version of Ruby. RVM lets you easily switch between different environments, based on needs, when developing.

83
Q

What is XCode?

A

An integrated development environment (IDE) created by Apple for developing OS X and iOS software.

84
Q

What is Git?

A

Git is the most popular distributed version control system used for software development. It is used to efficiently maintain and manage code for a project, is free and open source, has an emphasis on speed and data assurance, and allows for multiple workflows which can branch out or merge as needed.

85
Q

What does SCM stand for?

A

Source Code Management is generally achieved via software that provides coordination, communication and version control services to developers.

86
Q

What is a VCS?

A

Version Control Systems (like Git) provide monitored and regulated access to a software repository.

87
Q

Why is Git useful for a developer?

A

Git version control system is useful for a developer because it allows the developer the ability to access previous versions of their project, essentially being able to rewind time if they decide that a previous commit is better suited for their needs; be it a current implementation isn’t working out, or to investigate changes to find where any problems may exist.

88
Q

Why is Git useful for a team of developers?

A

Using Git allows a team of developers to independently work alongside one another, while having the ability to seamlessly implement those changes to the main project. It also helps situations where independent developers work may contradict each other, by showing changes and allowing the developers to choose which ones they would like to keep.

89
Q

How do you create a new Git repository for a project locally?

A

To create a Git repository locally, you want to navigate to the root directory of your project and type ‘git init’. This will initialize a local repository and load all of the necessary files git will need to track the files in that directory.

90
Q

How do you create it on Github?

A

By clicking on the plus symbol (‘+’) of your github user account and selecting NEW REPOSITORY

91
Q

How do you commit changes?

A

By typing a git command, “git commit -m “Your message”. It will move the files from staged to unmodified. Type “git status” prior to commit. You can see “Changes to be committed:”. Type “git status” again after commit, you will see “nothing to commit, working directory clean”.

The other way is typing a git commit -am “Your message”, which will both stage and commit changes.

92
Q

What is the difference between staging and committing changes?

A

Staging is moving files from Modified to Staged by issuing a git command, “git add your_file”, “git add . “, or “git add -A”. Committing is moving files from Staged to Unmodified.

93
Q

What is the difference between committing your changes and pushing them to Github?

A

Committing your changes will only save them in your local repository. Pushing them to Github will save them to your remote repository.

94
Q

What is the difference between a “remote” and your local repo?

A

A remote repo allows you to either pull upstream changes from the master repo, or publish (push) your local commits. A local repo is the enviroment where we can make local changes and is typically the one on our computer.

95
Q

How do you check the status of your current repo in git?

A

git status

96
Q

How do you see the history of your previous commits (from the command line)?

A

git log

97
Q

How can you look through your historical commits on the Github website?

A

You can look through a history of commits by clicking on the repository name and then clicking the commits.

98
Q

What is a “Merge”?

A

A merge is when you take the changes you’ve made on one branch, and bring them into another branch to update it with the new changes.

99
Q

What is a “Pull Request”?

A

A pull request is when you contribute to someones else’s project, and you let them know that you have made changes that they can look over and possibly implement into their project.

100
Q

What is “Forking” a repo?

A

Making a copy of another master repo into your own github account so as to not disturb the master in order to do work on it, make changes and/or corrections and later submit for a pull request

101
Q

What is “Cloning” a repo?

A

Making an identical copy of a Git repo on your local server is “cloning” the repo. This is different from forking, where a copy of a repo is made in Git itself.

102
Q

What is “Branching”?

A

Branching is when the developer creates a separate version of their local repository (master branch), allowing changes to be made to that new branch, that won’t affect their master until the developer wishes to merge the changes.

103
Q

Why would you use a branch?

A

Using a new branch allows the developer to make experimental changes to their project while having the ability to either discard those changes later, or merge them into their main project. It also allows teams to work off the master branch simultaneously and merge them all later.

104
Q

How do you create a new branch?

A

Create a new branch by typing: “git checkout -b branch_name”

105
Q

Why would you use a branch?

A

Branching allows for different features to be developed without modifying the main document. The feature can then be merged into the main document if and when desired.

106
Q

How do you create a new branch?

A

In your terminal type git branch to create a branch. Then type git checkout to start working on your new branch.

You can combine the two commands and just type git checkout -b and that will create and change into your new branch.

107
Q

How do you merge branches back together?

A

In order to merge branches back together you should merge the master branch into your-branch

$git checkout your-branch
$git merge master

Resolve any conflicts that occur. Move back to your master branch and merge your-branch into the master branch.

$git checkout master
$git merge your-branch

You’ll see output indicating any changes that were made

108
Q

What is a “Merge Conflict” and when will it occur?

A

A merge conflict occurs during a merge when the same part of some file has changed in the two different branches. For example, let’s say John and Jane are working on a project together. John creates a branch for a feature he is working on. While he is working on this branch, he modifies a file that Jane has also modified on the master branch. When John attempts to merge the master branch into his feature branch, he’ll receive a message that the automatic merge failed and that the conflicts need to be fixed and the changes committed.

109
Q

How do you resolve a “Merge Conflict”?

A

In order to solve a Merge Conflict, one needs to open the conflicting file in a text editor and find the conflicting lines of code. One can find the conflict by spotting the merge markers. To resolve the this, delete the line you want to get rid of and then delete the merge markers. After deleting the merge markers, you can save the file, add it to the stage, and finally commit it. Done.