Skip to main content
pelatihan
.org
Learn. Practice. Grow.
Category
EN
Sign in
Sign up
Menu
Git Curriculum: 5 Chapters, 49 Lessons — pelatihan.org
Home
/
Catalog
/
Git
/
Curriculum
Curriculum
Git Curriculum
Learn Git online with 49 structured lessons, code examples, and 245 quiz questions.
49 lessons
5 chapters
245 questions
Summaries and key points are free to preview. Full lessons, code examples, and quizzes require a subscription.
01
Git Tutorial
17 lessons
01
Git HOME
This page is the gateway to Git material: a series of lessons that takes you from installation, commit, branch, to collaboration on GitHub. Git is a version control system that…
02
Git Intro
Git is a distributed version control system that makes project snapshots on each commit. Each developer has a complete copy of the repository, so the work can still be done…
03
Git Install
Git can be installed for free on Windows, macOS, and Linux from the official website. In Linux, only one package command is available, in macOS it is available via Xcode Command…
04
Git Config
Git configuration is stored at three levels: system (for all machine users), global (for one user), and local (for one repository). The local level is the most specific and…
05
Git Get Started
To start a project with Git, create a new repository with Git init, insert the file into the staging area with Git add, and then save it as commit with Git commit. The first…
06
Git New Files
A new file that's never been identified by Git is untracked. Use the status git to view the list of untracked, modified, or staged files. Enter the file into the staging with git…
07
Git Staging
Staging area (index) is the preparation layer between a working directory and a commit. With staging, you can compile a logical snapshot by selecting only the relevant changes…
08
Git Commit
Commit stores snapshots of the staging area into the repository's history, complete with messages, authors, and time. Write a concise commit message in the first line (ideally…
09
Git Tagging
Tags are used to mark milestones in history, generally for releases of versions such as v1.0. Git has two types of tags: lightweight that is just a bookmark, and annotated that…
10
Git Stash
The git stash command saves unfinished changes to the stack temporarily so that the working directory is cleaned back and you can move the branch. git stash reapplies the last…
11
Git History
The repository history can be explored with git, which displays each commit's hash, author, date, and message. A concise view is available via the --online option, while --graph…
12
Git Help
Git provides built-in help that can be accessed anytime without the internet. The git help <cmd> command opens up the complete documentation, while the git <cmd> -h provides a…
13
Git Branch
The branch allows you to develop features in parallel without interfering with the main branch. The git branch creates and lists branches, while the git switch moves between…
14
Git Merge
Merge combines changes from one branch to another active branch. If the target can move forward without making a combined commit, Git does fast-forward; if both branches are…
15
Git Workflow
Workflow determines how teams use branches to collaborate. Git Flow separates the main branch into play for release, develop for integration, as well as branch features,…
16
Git Best Practices
Some best practices help the team maintain the quality of the repository's history. Use a descriptive commit message, run tests before pushing, and avoid force push on the shared…
17
Git Glossary
The terms Git often sound technical, but most refer to a simple concept. The repository is a place to store the project and its history, the staging area is a commit preparation,…
02
Git and GitHub
13 lessons
01
GitHub Get Started
A remote is a copy of a repository that is on a server, for example on GitHub. To connect it to a local repository, create a new repository on GitHub and add the remote with the…
02
Git What is SSH?
SSH (Secure Shell) is an encrypted communication protocol commonly used to access servers remotely, including for Git on GitHub. SSH uses a pair of cryptographic keys: private…
03
GitHub Add SSH
To use SSH with GitHub, pair the key with the ssh-keygen, and then upload the public key to the GitHub account settings. Private keys should be kept on the computer and never…
04
GitHub Set Remote
Once the repository is connected to GitHub, you can check, edit, and manage the remote list with the remote git command. Remote URLs can be changed, for example from HTTPS to…
05
GitHub Edit Code
GitHub provides web-based editors to convert files without local clones. You can open the file, click the pencil icon, change the content, and then press Commit changes to save…
06
Pull from GitHub
Git pull takes the latest changes from the remote and incorporates them into the local branch that's currently active. Internally, pull consists of fetch (download reference) and…
07
Push to GitHub
Git sends a local commit to GitHub remote so that the team can access it. For the first push of a branch, use the -u option to connect the local branch to the remote (upstream).…
08
GitHub Branch
In addition to the local branch, Git recognizes remote branches represented as remote-tracking branches such as origin/play. The git branch -r command displays branches on the…
09
Pull Branch from GitHub
You can pull a branch from GitHub and work on it locally. The way is git fetch to update the remote reference, then git switch -c with -track to create a local branch that…
10
Push Branch to GitHub
Branches that are already working can be sent to GitHub so that the team can review or continue. First a branch requires a -u to make the branch remote and set upstream. If the…
11
GitHub Flow
GitHub Flow is a concise workflow that centers on pull requests: create branches, commit, open pull requests, then after review and approval of changes are combined and deployed.…
12
GitHub Pages
GitHub Pages is a free hosting feature for static sites that is taken directly from the GitHub repository. The source of the page could be a branch of gh-pages, a folder/docs, or…
13
Git GUI Clients
In addition to the terminal, Git is available through various GUI clients such as GitHub Desktop, Sourcetree, and VS Code's built-in source control integration. The GUI displays…
03
Git Contribute
3 lessons
01
GitHub Fork
Fork makes copies of other people's repositories in your own GitHub account, so you can modify them without written access to the original repo. Open source contribution streams…
02
Git Clone from GitHub
Git clone copies the entire repository from the remote to the local computer, including all commit history and all references. The result of an automatic clone has a remote named…
03
GitHub Send Pull Request
A pull request (PR) is a request for changes from your branch to be incorporated into the target branch, accompanied by a discussion and review space. In PR, teams can comment,…
04
Git Undo
6 lessons
01
Git Revert
Git revert cancels the effect of a commit by creating a new commit that contains the reverse of the change. Since the history is not deleted, this method is safe for commits that…
02
Git Reset
Git resets moves the pointer branch to another commit and can set the fate of changes in the staging and working directory through three modes: soft, mixed, and hard. The soft…
03
Git Amend
Git commit -- amend the last commit, both the message and the content, by replacing the commit with a new version. Amendments change the hash commit so that it's risky if the old…
04
Git Rebase
Rebase moves the commit range to the base of another branch so that the history looks linear and neat. The golden rule: don't revise commits that have already been shared with…
05
Git Reflog
Reflogs (reference log) record every movement of HEAD and other references in a local repository, such as when commit, checkout, reset, or rebase. Because these records are local…
06
Git Recovery
Git provides many recovery mechanisms for seemingly lost work. Reflog and git fsck found commits unaffordable, while git restore returned file content from a specific source.…
05
Git Advanced
10 lessons
01
Git .gitignore
The .gitignore file contains a pattern that tells Git not to track certain files or folders, such as build results, dependencies, and secret files. The tracked files remain…
02
Git .gitattributes
The .gitattributes file sets Git behavior for specific file paths, such as line ending handling, binary markup, and custom merge drivers. Unlike .gitignore which ignores files,…
03
Git Large File Storage (LFS)
Git Large File Storage (LFS) replaces large files in a repository with small pointers to keep the history light. The original files are stored on the LFS server and downloaded as…
04
Git Signing Commits/Tags
Signing commits and tags use cryptography to prove the identity of the author. Git supports GPG, SSH, and S/MIME as signatures. Commit signed is displayed with the Verified label…
05
Git Cherrypick & Patch
Git cherry-pick applies changes from certain commits in another branch to active branches, very useful for moving hotfixes to several branch releases. File-based alternatives are…
06
Git Merge Conflicts
Merge conflict occurs when two branches change the same row on one file so that Git cannot select an automated version. Conflict is marked with the blocks <<<<<< HEAD, =======,…
07
Git CI/CD
Continuous Integration (CI) builds and tests code automatically whenever there is a push or pull request, while Continuous Delivery/Deployment (CD) releases changes that have…
08
Git Hooks
Git hooks are scripts that are executed automatically on specific events such as commit, merge, and push. The client-side hook is in the .git/hooks folder, for example pre-commit…
09
Git Submodules
Submodules allow a repository to include other repositories within it on a specific commit, suitable for internal libraries or shared configurations. Submodules are recorded in…
10
Git Remote Advanced
In complex collaborative projects, a single repository can have multiple remotes, such as origin for its own fork and upstream for parent repo. Synchronize the fork by taking…