Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
title: Between Commits
description: Learn about Between Commits in Git

title: Between Commits
---

# Between Commits

To compare two specific commits in your Git history, use git diff followed by the hashes of the commits. This will show you the changes made between those two points, including added, modified, and deleted lines.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/checkout-tags/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Checkout Tags
description: Learn about Checkout Tags in Git
title: Checkout Tags
---

# Checkout Tags

Tags in Git are typically used to mark specific points in history, such as a release version. Checking out a tag means switching your working directory to the state of the repository at the point in time when that tag was created.


Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/citation-files/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Citation Files
description: Learn about Citation Files in Git
title: Citation Files
---

# CITATION files

You can add a CITATION.cff file to the root of a repository to let others know how you would like them to cite your work. The citation file format is plain text with human- and machine-readable citation information.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/collaboration/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Collaboration
description: Learn about Collaboration in Git
title: Collaboration
---

# Collaboration

When working on projects with others, Git provides tools to facilitate collaboration through forking repositories using `git clone` or `git fork`, cloning them locally with git clone, managing pull requests with `git request-pull`, and resolving merge conflicts. To contribute effectively, follow established contributing guides and respect open-source licenses that govern how contributors' work may be used by others.


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Commit Messages
description: Learn about Commit Messages in Git
title: Commit Messages
---

# Commit Messages

A Git commit message is a brief explanation of the changes introduced in a particular commit. It helps others (and your future self) understand the purpose of the changes and the context behind them. Writing clear and informative commit messages is an important practice for maintaining a well-organized and easily navigable project history.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-checkout/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Checkout
description: Switching branches and restoring files with git checkout
title: Git Checkout
---

# Git Checkout

The `git checkout` command is used to switch between branches and restore files from different commits.

## Switching Branches
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Commit --amend
description: How to modify the last commit with git commit --amend
title: Git Commit --amend
---

# Git Commit --amend

The `git commit --amend` command allows you to modify the most recent commit instead of creating a new one.

## When to Use
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-lfs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Lfs
description: Learn about Git Lfs in Git
title: Git Lfs
---

# Git LFS

Git Large File Storage (LFS) is an extension that helps manage large files by tracking metadata, not storing entire files. It allows storing and tracking binary assets like images, videos, audio files separately from your regular Git repository. By storing only metadata in your Git repository, you improve clone and push times, reducing storage usage. This approach is particularly useful for media repositories, large dataset storage, and binary asset management in game development. Note that Git LFS requires a separate server or storage system to store actual file content.

#### Free Resources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Log Options
description: Common options and flags for the git log command
title: Git Log Options
---

# Git Log Options

The `git log` command comes with many useful options to customize the output and filter commits.

## Common Options
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-reflog/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Reflog
description: Understanding and using git reflog for recovery
title: Git Reflog
---

# Git Reflog

The `git reflog` command shows a log of where HEAD has been, allowing you to recover lost commits and branches.

## What is Reflog?
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-remotes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Remotes
description: Learn about Git Remotes in Git
title: Git Remotes
---

# Git Remotes

In Git, a remote is a reference to a repository that exists on another server or system. Remotes allow you to access and interact with a copy of your repository that is stored elsewhere, making it possible to collaborate with others, share your work, and maintain multiple copies of your repository for backup and disaster recovery purposes. When you add a remote to your local repository, Git creates a reference to the remote repository, enabling you to push changes from your local repository to the remote one, pull changes from the remote to your local one, or fetch changes from the remote without updating your local copy. This enables distributed development and helps maintain a centralized version of your project's history, making it easier to track changes, manage conflicts, and ensure that everyone has access to the most up-to-date code.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-reset/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Reset
description: Understanding git reset and its different modes
title: Git Reset
---

# Git Reset

The `git reset` command is used to undo changes and move the HEAD pointer to a different commit.

## Reset Modes
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/git-revert/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Revert
description: How to safely undo commits with git revert
title: Git Revert
---

# Git Revert

The `git revert` command creates a new commit that undoes the changes from a previous commit. Unlike `git reset`, it doesn't alter history.

## Why Use Revert?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Handling Conflicts
description: Learn about Handling Conflicts in Git
title: Handling Conflicts
---

# Handling Conflicts

When multiple developers work on the same project simultaneously, conflicts can arise during the merging process. This occurs when changes made by different individuals overlap or contradict each other in a specific code file. In such situations, Git's conflict resolution mechanism comes into play, allowing users to manually resolve these issues and merge the conflicting changes.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/history/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: History
description: Learn about History in Git
title: History
---

# History

The history of a Git repository is a record of all commits made over time, including changes to files, commit messages, and metadata. This history is stored as a series of snapshots, with each commit representing a new version of the codebase.

#### Free Resources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Managing Remotes
description: Learn about Managing Remotes in Git
title: Managing Remotes
---

# Managing Remotes

In Git, a remote repository refers to a copy of a project's source code stored on a server or other machine.

- Adding remotes: Use `git remote add [name] [url]` to add a new remote repository. This allows you to track changes and push/pull updates from the remote.
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/managing-tags/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Managing Tags
description: Learn about Managing Tags in Git
title: Managing Tags
---

# Managing Tags

In Git, a tag is a named reference to a specific commit in the project's history.

- Creating tags: Use `git tag [name] [commit-hash]` to create a new tag. You can also use `git tag -a [name] -m "[message]" [commit-hash]` for annotated tags.
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/pushing-tags/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Pushing Tags
description: Learn about Pushing Tags in Git
title: Pushing Tags
---

# Pushing Tags

Pushing tags in Git is the process of sharing your local tags with a remote repository. Tags in Git are used to mark specific points in the repository's history, typically to signify a release or a milestone.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/staged-changes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Staged Changes
description: Learn about Staged Changes in Git
title: Staged Changes
---

# Staged Changes

To view the changes you've staged with `git add`, but not yet committed, use `git diff --cached`. This command compares the staged files against their original versions in the repository. It's a quick way to review what you're about to commit before finalizing it.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/staging-area/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Staging Area
description: Learn about Staging Area in Git
title: Staging Area
---

# Staging Area

In Git, a staging area serves as an intermediate step between your local repository changes and the actual commit.

- Temporary storage: The staging area holds changes that are intended to be part of the next commit.
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/submodules/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Submodules
description: Learn about Submodules in Git
title: Submodules
---

# Submodules

In Git, submodules allow you to include another repository within a project. This feature enables the management of external dependencies as part of the main project.

- Including external repositories: Submodules can be used to include other Git repositories within your project.
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/2-git-basics/commands/tagging/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Tagging
description: Learn about Tagging in Git
title: Tagging
---

# Tagging

In Git, tags are used to identify specific points in a repository's history as being important. This feature allows developers to mark release points or milestones.

- Marking release points: Tags are typically used to mark release versions (e.g., v1.0, v2.0) of a project.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Adding and Updating Files
description: How to add new files and update existing files in Git
title: Adding and Updating Files
---

# Adding and Updating Files

Git tracks changes to files through explicit commands. You need to tell Git which files to include in your next commit.

## Adding New Files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Git Attributes
description: Learn about Git Attributes in Git
title: Git Attributes
---

# Git Attributes

Git attributes are settings stored in the .gitattributes file, controlling how Git handles files in your repository. They can influence filtering (e.g., ignoring specific files), conversion (formatting or transforming files during Git operations), and formatting (applying consistent styles). These settings can be applied to specific file types (like *.txt) or filter files based on content patterns. Attributes also define smudge patterns (highlighting differences) and ignore patterns, helping maintain a clean repository by automatically applying intended settings for certain file types.


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: .gitignore Files
description: How to use .gitignore to exclude files from Git tracking
title: .gitignore Files
---

# .gitignore Files

The `.gitignore` file tells Git which files and directories to ignore in your repository.

## Creating .gitignore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: .gitkeep Files
description: How to track empty directories in Git using .gitkeep
title: .gitkeep Files
---

# .gitkeep Files

Git doesn't track empty directories. The `.gitkeep` file is a convention used to force Git to track empty directories.

## The Problem
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Staged Changes
description: Understanding the Git staging area and staged changes
title: Staged Changes
---

# Staged Changes

Staged changes are modifications that have been marked for inclusion in the next commit using `git add`.

## What Are Staged Changes?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Unstaged Changes
description: Understanding unstaged changes in Git and how to manage them
title: Unstaged Changes
---

# Unstaged Changes

Unstaged changes are modifications to tracked files that haven't been added to the staging area yet.

## What Are Unstaged Changes?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Working Directory
description: Learn about Working Directory in Git
title: Working Directory
---

# Working Directory

A working directory in Git is the local environment where files are stored and modified as part of a project. It reflects the current state of the project's files, allowing developers to edit, add, or delete files. Changes made in the working directory can be staged for commit, which means they're prepared for inclusion in the next commit. The working directory is connected to the Git repository, and it helps manage the differences between the committed history and the current state of the files. It plays a central role in tracking changes, testing, and developing new features.

Learn more from the following resources:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Between Branches
description: Learn about Between Branches in Git
title: Between Branches
---

# Between Branches

When comparing the differences between two branches, such as a feature branch and its upstream parent branch, use `git diff <branch1>..<branch2>`. This command displays the changes made on the feature branch relative to the parent branch. It's useful for reviewing the impact of new features or changes before merging them into your mainline.

#### Free Resources
Expand Down
4 changes: 1 addition & 3 deletions contents/docs/3-git-branching/basics/branch-naming/index.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Branch Naming
description: Learn about Branch Naming in Git
title: Branch Naming
---

# Branch Naming

A well-defined branch naming convention is essential for maintaining a clean and organized Git workflow. It's recommended to use descriptive and meaningful names that clearly indicate the purpose of each branch. For example, using prefixes like `feature/`, `fix/`, or `docs/` can help identify whether a branch is related to new feature development, bug fixes, or documentation updates. Additionally, including the issue or task ID (e.g., `issue/123`) can provide context and make it easier for team members to find relevant information. By following a consistent naming convention, you can improve collaboration, reduce confusion, and increase the overall efficiency of your Git workflow.

#### Free Resources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Checkout Branch
description: Learn about Checkout Branch in Git
title: Checkout Branch
---

# Checkout Branch

In Git, to "checkout" from a branch means to switch your working directory to that branch, making it the active branch. This updates your files to match the state of that branch and allows you to work on it.

#### Free Resources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: Cherry Picking Commits
description: Learn about Cherry Picking Commits in Git
title: Cherry Picking Commits
---

# Cherry Picking Commits

Cherry-picking in Git allows you to apply a specific commit from one branch to another, without merging the entire branch. This is useful when you want to bring in a specific feature or fix from one branch to another without incorporating all the changes from the source branch.

#### Free Resources
Expand Down
Loading