Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular 6 for Enterprise-Ready Web Applications

You're reading from   Angular 6 for Enterprise-Ready Web Applications Deliver production-ready and cloud-scale Angular web apps

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781786462909
Length 512 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Doguhan Uluca Doguhan Uluca
Author Profile Icon Doguhan Uluca
Doguhan Uluca
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Setting Up Your Development Environment FREE CHAPTER 2. Create a Local Weather Web Application 3. Prepare Angular App for Production Release 4. Staying Up to Date with Angular Updates 5. Enhance Angular App with Angular Material 6. Reactive Forms and Component Interaction 7. Create a Router-First Line-of-Business App 8. Continuous Integration and API Design 9. Design Authentication and Authorization 10. Angular App Design and Recipes 11. Highly-Available Cloud Infrastructure on AWS 12. Google Analytics and Advanced Cloud Ops 13. Other Books You May Enjoy

Git and GitHub Desktop

This section aims to establish a best practice Git configuration that's suitable for the widest audience possible. In order to make the best use of this section and subsequent chapters of this book, it is presumed that you, the reader, have the following prerequisites fulfilled:

  • An understanding of what Source Code Management and Git are
  • Create a free account on GitHub.com

Why use GitHub?

If you are a Git user, chances are that you also use an online repository, such as GitHub, Bitbucket, or GitLab. Each repository has a free-tier for open source projects, coupled with robust websites with varying feature sets, including on-premise Enterprise options that you can pay for. GitHub, with 38+ million repositories hosted in 2016, is by far the most popular online repository. GitHub is widely considered a baseline utility that will never go offline by the community.

Over time, GitHub has added many rich features that have transformed it from a mere repository to an online platform. Throughout this book, I’ll be referencing GitHub features and functionalities, so you can leverage its capabilities to transform the way you develop, maintain, and release software.

Why use GitHub Desktop?

It is true that the Git CLI tool is powerful, and you will be just fine if you stick to it. However, we, full-stack developers, are worried about a variety of concerns. In your rush to complete the task at hand, you can easily ruin your and sometimes your team's day, by following bad or incomplete advice.

See the following screenshot of such advice from StackOverflow (http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull):

If you execute the preceding command, be prepared to lose uncommitted local changes. Unfortunately, novice users have a tendency to follow the simplest and most direct instructions, potentially leading to lost work. If you think your past commits are safe, think twice! When it comes to Git, if you can imagine it, it can be done through the CLI.

Thankfully, with GitHub, you can protect branches and implement the GitHub workflow, which entails branching, committing, merging, updating, and submitting pull requests. The protections and the workflow help prevent harmful Git commands from making irreversible changes and enable a level of quality control so that your team remains productive. Performing all of these actions through the CLI, especially when there are merge conflicts, can get complicated and tedious.

For a more in-depth understanding of the benefits and pitfalls of Git and GitHub, you can read my 2016 article on the topic at: Bit.ly/InDepthGitHub.

Installing Git and GitHub Desktop

GitHub Desktop provides an easy-to-use GUI to execute the GitHub workflow, in a manner that is consistent across Windows and macOS. Consistency is highly valuable when on-boarding new or junior team members or if you're not a frequent contributor to the code base.

  1. Execute the installation command:

For Windows:

PS> choco install git github-desktop -y

For macOS:

$ brew install git && brew cask install github-desktop
  1. Verify your Git installation by executing git --version and observe the version number returned
You will need to restart your Terminal after the installation of a new CLI tool. However, you can avoid relaunching your Terminal and save some time by refreshing or sourcing your environment variables. On Windows, execute refreshenv; on macOS, execute source ~/.bashrc or source ~/.zshrc.
  1. Verify your GitHub Desktop installation by launching the application
  2. Sign in to https://github.com/ on GitHub Desktop
  3. Once you have created a repository, you can launch the application from your Terminal by executing this:
$ github path/to/repo
  1. If you are already on the correct folder, you can type in the following command instead:
$ github .
For Windows, on GitHub Desktop launch, if you get stuck on the Sign in screen, close the application, relaunch it as an administrator, complete the setup, and then you will be able to use it normally, without having to launch it as an administrator again. For more information, refer to: https://desktop.github.com/.
You have been reading a chapter from
Angular 6 for Enterprise-Ready Web Applications
Published in: May 2018
Publisher: Packt
ISBN-13: 9781786462909
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image