Skip to content

Commit

Permalink
Merge pull request #1070 from github/stamat/git-guides-a11y-updates
Browse files Browse the repository at this point in the history
Git guides a11y updates
  • Loading branch information
stamat committed May 27, 2024
2 parents 21e6348 + ce24c92 commit a50017c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion git-guides/git-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion git-guides/git-clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions git-guides/git-pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -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`.

10 changes: 5 additions & 5 deletions git-guides/install-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand All @@ -44,15 +44,15 @@ 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.
3. Open the command prompt "terminal" and type `git version` to verify Git was installed.

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:

Expand All @@ -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`.
Expand Down

0 comments on commit a50017c

Please sign in to comment.