Schweitzer Fachinformationen
Wenn es um professionelles Wissen geht, ist Schweitzer Fachinformationen wegweisend. Kunden aus Recht und Beratung sowie Unternehmen, öffentliche Verwaltungen und Bibliotheken erhalten komplette Lösungen zum Beschaffen, Verwalten und Nutzen von digitalen und gedruckten Medien.
Chapter 1
IN THIS CHAPTER
Getting familiar with GitHub
Discovering Git
Signing up with GitHub.com
Exploring helpful resources
Whether you're an experienced coder or a newbie starting out, learning how to work with others on code is critical to succeeding in the software industry. Millions of people around the world work together to build software, and GitHub is one of the largest tools to support a collaborative workflow. This chapter introduces you to the core tools you need to write code with other people.
GitHub creates an environment that allows you to store your code on a remote server, gives you the ability to share your code with other people, and makes it easy for more than one person to add, modify, or delete code to the same file and project, while keeping one source of truth for that file (phew!). So what does that all actually mean? One of my favorite ways of explaining GitHub.com to folks who are new to the tool is to compare it to Google Docs - a place online where you can write code with other people and not have to email different versions back and forth.
What makes GitHub work behind the scenes is Git.
Version control systems (also known as source control management, or SCM) are software that keep track of each version of each file in a coding project, a timestamp for when that version was created, and the author of those changes.
Writing code is an iterative process. For example, when you're building a website, you first may want to get some basic structure up before adding all your content. The best thing to do is to create a version of your website each time you have something that works. That way, as you experiment with the next piece, if something breaks, you can just go back to your previous version and start over.
SCMs enable coders to make mistakes without worrying that they'll have to completely start over. Think of it like being able to click Undo, but instead of undoing each key press, you can undo an entire piece of the project if you decide you don't like it or it doesn't work.
The basic workflow of coding with version control system support is as follows:
You can use a version control system if you're working alone on your own computer, but it gets even more interesting when you begin working with other people. (For more on working with other people, see the section "Git Version Control," coming up next in this chapter).
For more information about version control, visit https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control.
https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
GitHub, as the name would suggest, is built on Git. Git is a type of version control system, and it's free and open source, which means that anyone can use it, build on top of it, and even add to it.
GitHub products make using Git easy, but if you're curious, you can also use Git to track your solo projects on your computer. You can find a brief introduction to local Git commands for solo projects in the next section.
With the help of Git for Windows, using the terminal on Mac, Windows, or Linux computers is exactly the same. A terminal is an application that enables you to interact with your computer in a text-based way - in other words, instead of double-clicking and dragging, you type commands to navigate your computer.
If you're on Mac or Linux, a terminal is already installed on your computer. If you're using a Windows computer, you have a couple options:
https://gitforwindows.org
Many developers on Windows prefer to use PowerShell as their terminal environment. You can use Git within PowerShell, but setting that up properly is outside the scope of this book. However, you can find a handy guide to setting this up at https://haacked.com/archive/2011/12/13/better-git-with-powershell.aspx.
https://haacked.com/archive/2011/12/13/better-git-with-powershell.aspx
The Windows Subsytem for Linux (WSL) lets developers run a GNU/Linux environment directly from Windows. You can learn more about it on the Microsoft docs page https://learn.microsoft.com/windows/wsl/.
https://learn.microsoft.com/windows/wsl/
First, find the Terminal application:
When the application opens, type git --version in the terminal. If you have Git installed, you should see a version number, as shown in the following code (the $ is a common indicator that the terminal is ready for input and is often already on the line; when you see that throughout this book, you should not type it). Otherwise, you can follow the instructions on https://git-scm.com/book/en/v2/Getting-Started-Installing-Git.
git --version
$
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
When using the command line, you have to be very careful about exactly what you're typing. In the following code, the first instruction is for you to type git --version. You should note that a space appears between git and the rest of the instruction but no other spaces. You should also note the two dashes before the word version. They can be easy to miss, so be careful!
git
version
For Mac or WSL/Linux, you should see something like this:
$ git --version git version 2.37.2 $
For Windows, you should see something like this:
$ git --version git version 2.37.2.windows.2 $
Next, using the terminal, go to your desktop and create a new folder called git-practice. To do this, you should type the following commands:
$ cd ~/Desktop $ mkdir git-practice $ cd git-practice $
For Mac or WSL/Linux if you type pwd, you should see that you are now in the folder git-practice, which is on your desktop. It might look something like this:
pwd
$ pwd $ /Users/drguthals/Desktop/git-practice $
If you're using the command prompt in Windows instead of Git Bash or WSL, you should use cd to print the current directory instead of pwd.
cd
In 2020, GitHub heard the developer community and began a massive renaming project to stop using "master" as the default name for the primary branch of a respository and to use "main" instead. This change has proliferated to Git as well. When you initialize your local folder to use Git, you might be prompted to update your default primary branch name to "main." Whether you are prompted or not, you can update all Git repositories to use "main" as the primary branch name with this command:
$ git config --global init.defaultBranch main
I recommend that you run this config command before you initialize your Git repository so that your primary branch is called main.
config
main
Now, you can tell Git to track this folder using the init command.
init
$ git init Initialized empty Git repository in /Users/drguthals/Desktop/git-practice $
Then make sure that you have a clean folder. You can check with the status command:
status
$ git status On branch main No commits yet nothing to commit (create/copy files and use "git add" to track) $
Then, you can create a file to have Git start tracking and confirm the file is in the folder:
$ echo "practicing git" > file.txt $ ls file.txt $
On Mac, you can...
Dateiformat: ePUBKopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.