diff --git a/git-guides/git-add.md b/git-guides/git-add.md index f9096fc6a..94f7f013c 100644 --- a/git-guides/git-add.md +++ b/git-guides/git-add.md @@ -75,7 +75,7 @@ If the time is right to stage all files, there are several commands that you can * `git add .`: adds the entire directory recursively, including files whose names begin with a dot * `git add -u`: stages modified and deleted files only, NOT new files -| | New files | Modified files | Deleted files | Files with names beginning with a dot | Current directory | Higher directories| +| Command | New files | Modified files | Deleted files | Files with names beginning with a dot | Current directory | Higher directories| | ------------- | ------------- | ---- | ---- | ------ | ----- | ----- | | `git add -A` | Yes | Yes | Yes | Yes | Yes | Yes | | `git add .` | Yes | Yes | Yes | Yes | Yes | No | diff --git a/git-guides/git-clone.md b/git-guides/git-clone.md index 9710b30e9..9f3b4918e 100644 --- a/git-guides/git-clone.md +++ b/git-guides/git-clone.md @@ -4,7 +4,7 @@ The `git clone` command is used to create a copy of a specific repository or bra Git is a distributed version control system. Maximize the advantages of a full repository on your own machine by cloning. -### What Does `git clone` Do? +## What Does `git clone` Do? ```sh git clone https://github.com/github/training-kit.git diff --git a/git-guides/git-pull.md b/git-guides/git-pull.md index 332a2533f..5d784b9d0 100644 --- a/git-guides/git-pull.md +++ b/git-guides/git-pull.md @@ -4,7 +4,7 @@ Without `git pull`, (or the effect of it,) your local branch wouldn't have any of the updates that are present on the remote. -### What Does `git pull` Do? +## What Does `git pull` Do? ```sh git pull @@ -20,7 +20,7 @@ git pull However, you may want to use `git fetch` instead. One reason to do this may be that you expect conflicts. Conflicts can occur in this way if you have new local commits and new commits on the remote. Just like a merge conflict that would happen between two different branches, these two different lines of history could contain changes to the same parts of the same file. If you first operate `git fetch`, the merge won't be initiated, and you won't be prompted to solve the conflict. This gives you the flexibility to resolve the conflict later without the need for network connectivity. -Another reason you may want to run `git fetch` is to update to all remote tracking branches before losing network connectivity. If you run `git fetch`, and then later try to run `git pull` without any network connectivity, the `git fetch` portion of the `git pull` operation will fail. +Another reason you may want to run `git fetch` is to update to all remote tracking branches before losing network connectivity. If you run `git fetch`, and then later try to run `git pull` without any network connectivity, the `git fetch` portion of the `git pull` operation will fail. If you do use `git fetch` instead of `git pull`, make sure you remember to `git merge`. Merging the remote tracking branch into your own branch ensures you will be working with any updates or changes. @@ -90,4 +90,3 @@ Using `git pull --rebase` does not affect the integrity of the changes or the co - `git push`: Uploads all local branch commits to the remote. - `git log`: Browse and inspect the evolution of project files. - `git remote -v`: Show the associated remote repositories and their stored name, like `origin`. - diff --git a/git-guides/install-git.md b/git-guides/install-git.md index 511f20875..f28b84980 100644 --- a/git-guides/install-git.md +++ b/git-guides/install-git.md @@ -29,7 +29,7 @@ Note: [`git-scm`](https://git-scm.com/download/win) is a popular and recommended ## Install Git on Windows through Visual Studio Code GitHub integration is provided through the [GitHub Pull Requests and Issues extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github). -To get started with the GitHub in VS Code, you'll need to create an account and install the GitHub Pull Requests and Issues extension. +To get started with the GitHub in VS Code, you'll need to create an account and install the GitHub Pull Requests and Issues extension. Once you've installed the [GitHub Pull Requests and Issues extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github), you'll need to sign in. Follow the prompts to authenticate with GitHub and return to VS Code. @@ -44,7 +44,7 @@ Note: You can perform actions like, you can search for and clone a repository fr Most versions of MacOS will already have `Git` installed, and you can activate it through the terminal with `git version`. However, if you don't have Git installed for whatever reason, you can install the latest version of Git using one of several popular methods as listed below: -#### Install Git From an Installer +### Install Git From an Installer 1. Navigate to the latest [macOS Git Installer](https://sourceforge.net/projects/git-osx-installer/files/git-2.23.0-intel-universal-mavericks.dmg/download?use_mirror=autoselect) and download the latest version. 2. Once the installer has started, follow the instructions as provided until the installation is complete. @@ -52,7 +52,7 @@ Most versions of MacOS will already have `Git` installed, and you can activate i Note: [`git-scm`](https://git-scm.com/download/mac) is a popular and recommended resource for downloading Git on a Mac. The advantage of downloading Git from `git-scm` is that your download automatically starts with the latest version of Git. The download source is the same [macOS Git Installer](https://sourceforge.net/projects/git-osx-installer/files/git-2.23.0-intel-universal-mavericks.dmg/download?use_mirror=autoselect) as referenced in the steps above. -#### Install Git from Homebrew +### Install Git from Homebrew [Homebrew](https://brew.sh/) is a popular package manager for macOS. If you already have Homebrew installed, you can follow the below steps to install Git: @@ -66,14 +66,14 @@ Fun fact: Git was originally developed to version the Linux operating system! So You can install `Git` on Linux through the package management tool that comes with your distribution. -#### Debian/Ubuntu +### Debian/Ubuntu 1. Git packages are available using `apt`. 2. It's a good idea to make sure you're running the latest version. To do so, Navigate to your command prompt shell and run the following command to make sure everything is up-to-date: `sudo apt-get update`. 3. To install Git, run the following command: `sudo apt-get install git-all`. 4. Once the command output has been completed, you can verify the installation by typing: `git version`. -#### Fedora +### Fedora 1. Git packages are available using `dnf`. 2. To install Git, navigate to your command prompt shell and run the following command: `sudo dnf install git-all`.