모든 강좌
초급 10 hours 무료

Git Basics: Version Control from Zero

Learn Git from scratch by practicing in a terminal inside your browser: commits, history, undoing changes, branches, merge, conflicts, rebase, GitHub, pull requests and team best practices.

강좌 시작
코스 배지 Git Basics 모든 레슨을 완료하면 받을 수 있어요.
Git Basics: Version Control from Zero

강좌 내용

모듈 1

Getting started

4 레슨
1

What is Git?

What version control is, how Git was born, how it differs from GitHub, and why virtually every software team uses it.

20 min 무료
2

Installing and configuring Git

How to install Git on Windows, macOS and Linux, check the version, and do the initial setup: name, email, main branch and editor.

25 min 무료
3

The terminal in 15 minutes

The basic terminal commands you need to use Git: moving between folders, listing, creating, reading and editing files.

20 min 무료
4

Your first repository

Create a repository with git init, understand what the .git folder is, and read what git status tells you.

25 min 무료
모듈 2

The basic cycle

5 레슨
5

Git's three areas

Working directory, staging area and repository: the mental model that explains every Git command and the lifecycle of a file.

25 min 무료
6

Saving changes: git add and git commit

Stage files with git add (one, several or all), save commits with git commit -m, the -a shortcut, and how to read Git's response.

30 min 무료
7

Good commit messages

How to write clear commit messages, how often to commit, and how to fix the last commit with git commit --amend.

20 min 무료
8

Ignoring files with .gitignore

Which files should never go into a repository, how to write a .gitignore with patterns, and what to do if you already committed something you should have ignored.

20 min 무료
9

Seeing what changed: git diff

Read the output of git diff, compare the working directory, the staging area and commits, and review your changes before saving them.

25 min 무료
모듈 3

History and undoing changes

4 레슨
10

Exploring the history

git log and its most useful options, git show to inspect a commit, what HEAD is, how to refer to earlier commits with ~ and ^, and how to travel to an old version.

30 min 무료
11

Discarding changes: restore, rm and mv

Undo changes you haven't saved yet with git restore, take files out of the staging area, recover deleted files, and delete or rename files with Git.

25 min 무료
12

Undoing commits: reset and revert

The two ways to undo commits: git revert creates a commit that cancels them and git reset moves the branch back (--soft, --mixed and --hard). When to use each one.

35 min 무료
13

Setting work aside: git stash

Put changes aside without committing using git stash to deal with another task, and get them back later with pop or apply.

20 min 무료
모듈 4

Branches

4 레슨
14

Branches: branch and switch

What a branch is, how to create one, switch between branches, list, rename and delete them, and why branches are so cheap in Git.

30 min 무료
15

Merging branches

Integrate one branch's work into another with git merge: fast-forward, three-way merge commit, the --no-ff option, and cleaning up finished branches.

30 min 무료
16

Resolving conflicts

Why merge conflicts happen, how to read the <<<<<<< ======= >>>>>>> markers, resolve them step by step or cancel the merge, and how to avoid them.

35 min 무료
17

Rebase and cherry-pick

Replay your commits on top of another branch with git rebase for a linear history, resolve conflicts during a rebase, copy a single commit with cherry-pick, and when NOT to rebase.

35 min 무료
모듈 5

Working as a team

3 레슨
18

Remote repositories and git push

Create a repository on GitHub or GitLab, connect it with git remote add, upload your commits with git push, understand the upstream, and authenticate with SSH or a token.

35 min 무료
19

Working with others: clone, fetch and pull

Copy a repository with git clone, bring in your team's changes with git fetch and git pull, and what to do when your push is rejected because the remote has new work.

35 min 무료
20

Pull requests and code review

The collaborative workflow on GitHub and GitLab: branch, push, open a pull request, review code, address comments, merge and clean up. Also how to contribute to other people's projects with a fork.

30 min 무료
모듈 6

Best practices

2 레슨
21

Tags and versions

Mark versions with git tag, the difference between lightweight and annotated tags, how to push them to the remote, and how to number versions with semantic versioning (SemVer).

25 min 무료
22

Conventional commits and workflows

The Conventional Commits convention, the most common workflows (GitHub Flow, Git Flow and trunk-based), a list of best practices, and a final project to review the whole course.

35 min 무료

디지털 존재감을 만들어 보세요

오늘 시작하세요. 메시지를 보내 주시면 24시간 이내에 답변드려요.