1
0
mirror of synced 2025-12-22 19:34:15 -05:00

updating content files

This commit is contained in:
Grace Park
2021-06-14 12:06:52 -07:00
parent 850ab9ccb4
commit 6f7e4f50dc
1154 changed files with 6299 additions and 6267 deletions

View File

@@ -15,7 +15,7 @@ versions:
enterprise-server: '*'
github-ae: '*'
---
### About remote repositories
## About remote repositories
A remote URL is Git's fancy way of saying "the place where your code is stored." That URL could be your repository on GitHub, or another user's fork, or even on a completely different server.
@@ -26,7 +26,7 @@ You can only push to two types of URL addresses:
Git associates a remote URL with a name, and your default remote is usually called `origin`.
### Creating remote repositories
## Creating remote repositories
You can use the `git remote add` command to match a remote URL with a name.
For example, you'd type the following in the command line:
@@ -39,7 +39,7 @@ This associates the name `origin` with the `REMOTE_URL`.
You can use the command `git remote set-url` to [change a remote's URL](/github/getting-started-with-github/managing-remote-repositories).
### Choosing a URL for your remote repository
## Choosing a URL for your remote repository
There are several ways to clone repositories available on {% data variables.product.product_location %}.
@@ -47,7 +47,7 @@ When you view a repository while signed in to your account, the URLs you can use
For information on setting or changing your remote URL, see "[Managing remote repositories](/github/getting-started-with-github/managing-remote-repositories)."
### Cloning with HTTPS URLs
## Cloning with HTTPS URLs
The `https://` clone URLs are available on all repositories, regardless of visibility. `https://` clone URLs work even if you are behind a firewall or proxy.
@@ -65,7 +65,7 @@ When you `git clone`, `git fetch`, `git pull`, or `git push` to a remote reposit
{% if currentVersion == "free-pro-team@latest" %}If you'd rather use SSH but cannot connect over port 22, you might be able to use SSH over the HTTPS port. For more information, see "[Using SSH over the HTTPS port](/github/authenticating-to-github/using-ssh-over-the-https-port)."{% endif %}
### Cloning with SSH URLs
## Cloning with SSH URLs
SSH URLs provide access to a Git repository via SSH, a secure protocol. To use these URLs, you must generate an SSH keypair on your computer and add the **public** key to your {% data variables.product.product_name %} account. For more information, see "[Connecting to {% data variables.product.prodname_dotcom %} with SSH](/github/authenticating-to-github/connecting-to-github-with-ssh)."
@@ -81,14 +81,14 @@ When you `git clone`, `git fetch`, `git pull`, or `git push` to a remote reposit
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.19" or currentVersion == "github-ae@latest" %}
### Cloning with {% data variables.product.prodname_cli %}
## Cloning with {% data variables.product.prodname_cli %}
You can also install {% data variables.product.prodname_cli %} to use {% data variables.product.product_name %} workflows in your terminal. For more information, the [{% data variables.product.prodname_cli %}](https://cli.github.com/manual/) documentation.
{% endif %}
{% if currentVersion != "github-ae@latest" %}
### Cloning with Subversion
## Cloning with Subversion
You can also use a [Subversion](https://subversion.apache.org/) client to access any repository on {% data variables.product.prodname_dotcom %}. Subversion offers a different feature set than Git. For more information, see "[What are the differences between Subversion and Git?](/github/importing-your-projects-to-github/what-are-the-differences-between-subversion-and-git)"

View File

@@ -15,7 +15,7 @@ versions:
---
{% mac %}
### Using Atom as your editor
## Using Atom as your editor
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -24,7 +24,7 @@ versions:
$ git config --global core.editor "atom --wait"
```
### Using Visual Studio Code as your editor
## Using Visual Studio Code as your editor
1. Install [Visual Studio Code](https://code.visualstudio.com/) (VS Code). For more information, see "[Setting up Visual Studio Code](https://code.visualstudio.com/Docs/setup/setup-overview)" in the VS Code documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -33,7 +33,7 @@ versions:
$ git config --global core.editor "code --wait"
```
### Using Sublime Text as your editor
## Using Sublime Text as your editor
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -42,7 +42,7 @@ versions:
$ git config --global core.editor "subl -n -w"
```
### Using TextMate as your editor
## Using TextMate as your editor
1. Install [TextMate](https://macromates.com/).
2. Install TextMate's `mate` shell utility. For more information, see "[mate and rmate](https://macromates.com/blog/2011/mate-and-rmate/)" in the TextMate documentation.
@@ -55,7 +55,7 @@ versions:
{% windows %}
### Using Atom as your editor
## Using Atom as your editor
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
3. Type this command:
@@ -63,7 +63,7 @@ versions:
$ git config --global core.editor "atom --wait"
```
### Using Visual Studio Code as your editor
## Using Visual Studio Code as your editor
1. Install [Visual Studio Code](https://code.visualstudio.com/) (VS Code). For more information, see "[Setting up Visual Studio Code](https://code.visualstudio.com/Docs/setup/setup-overview)" in the VS Code documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -72,7 +72,7 @@ versions:
$ git config --global core.editor "code --wait"
```
### Using Sublime Text as your editor
## Using Sublime Text as your editor
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -81,7 +81,7 @@ versions:
$ git config --global core.editor "'C:/Program Files (x86)/sublime text 3/subl.exe' -w"
```
### Using Notepad++ as your editor
## Using Notepad++ as your editor
1. Install Notepad++ from https://notepad-plus-plus.org/. For more information, see "[Getting started](https://npp-user-manual.org/docs/getting-started/)" in the Notepad++ documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -93,7 +93,7 @@ versions:
{% linux %}
### Using Atom as your editor
## Using Atom as your editor
1. Install [Atom](https://atom.io/). For more information, see "[Installing Atom](https://flight-manual.atom.io/getting-started/sections/installing-atom/)" in the Atom documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -102,7 +102,7 @@ versions:
$ git config --global core.editor "atom --wait"
```
### Using Visual Studio Code as your editor
## Using Visual Studio Code as your editor
1. Install [Visual Studio Code](https://code.visualstudio.com/) (VS Code). For more information, see "[Setting up Visual Studio Code](https://code.visualstudio.com/Docs/setup/setup-overview)" in the VS Code documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -111,7 +111,7 @@ versions:
$ git config --global core.editor "code --wait"
```
### Using Sublime Text as your editor
## Using Sublime Text as your editor
1. Install [Sublime Text](https://www.sublimetext.com/). For more information, see "[Installation](https://docs.sublimetext.io/guide/getting-started/installation.html)" in the Sublime Text documentation.
{% data reusables.command_line.open_the_multi_os_terminal %}

View File

@@ -99,7 +99,7 @@ For more options for storing your credentials on Linux, see [Credential Storage]
{% endlinux %}
### Further reading
## Further reading
- "[Updating credentials from the OSX Keychain](/articles/updating-credentials-from-the-osx-keychain/)"
- "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)"

View File

@@ -19,7 +19,7 @@ When you're collaborating on projects with Git and {% data variables.product.pro
You can configure Git to handle line endings automatically so you can collaborate effectively with people who use different operating systems.
### Global settings for line endings
## Global settings for line endings
The `git config core.autocrlf` command is used to change how Git handles line endings. It takes a single argument.
@@ -57,7 +57,7 @@ $ git config --global core.autocrlf input
{% endlinux %}
### Per-repository settings
## Per-repository settings
Optionally, you can configure a *.gitattributes* file to manage how Git reads line endings in a specific repository. When you commit this file to a repository, it overrides the `core.autocrlf` setting for all repository contributors. This ensures consistent behavior for all users, regardless of their Git settings and environment.
@@ -68,7 +68,7 @@ A *.gitattributes* file looks like a table with two columns:
* On the left is the file name for Git to match.
* On the right is the line ending configuration that Git should use for those files.
#### Example
### Example
Here's an example *.gitattributes* file. You can use it as a template for your repositories:
@@ -99,7 +99,7 @@ You'll notice that files are matched—`*.c`, `*.sln`, `*.png`—, separated by
- `binary` Git will understand that the files specified are not text, and it should not try to change them. The `binary` setting is also an alias for `-text -diff`.
### Refreshing a repository after changing line endings
## Refreshing a repository after changing line endings
When you set the `core.autocrlf` option or commit a *.gitattributes* file, you may find that Git reports changes to files that you have not modified. Git has changed line endings to match your new configuration.
@@ -123,7 +123,7 @@ To ensure that all the line endings in your repository match your new configurat
$ git commit -m "Normalize all the line endings"
```
### Further reading
## Further reading
- [Customizing Git - Git Attributes](https://git-scm.com/book/en/Customizing-Git-Git-Attributes) in the Pro Git book
- [git-config](https://git-scm.com/docs/git-config) in the man pages for Git

View File

@@ -12,7 +12,7 @@ versions:
enterprise-server: '*'
github-ae: '*'
---
### Configuring ignored files for a single repository
## Configuring ignored files for a single repository
You can create a *.gitignore* file in your repository's root directory to tell Git which files and directories to ignore when you make a commit.
To share the ignore rules with other users who clone the repository, commit the *.gitignore* file in to your repository.
@@ -34,7 +34,7 @@ If you want to ignore a file that is already checked in, you must untrack the fi
$ git rm --cached <em>FILENAME</em>
```
### Configuring ignored files for all repositories on your computer
## Configuring ignored files for all repositories on your computer
You can also create a global *.gitignore* file to define a list of rules for ignoring files in every Git repository on your computer. For example, you might create the file at *~/.gitignore_global* and add some rules to it.
@@ -44,7 +44,7 @@ You can also create a global *.gitignore* file to define a list of rules for ign
$ git config --global core.excludesfile ~/.gitignore_global
```
### Excluding local files without creating a *.gitignore* file
## Excluding local files without creating a *.gitignore* file
If you don't want to create a *.gitignore* file to share with others, you can create rules that are not committed with the repository. You can use this technique for locally-generated files that you don't expect other users to generate, such as files created by your editor.
@@ -54,7 +54,7 @@ Use your favorite text editor to open the file called *.git/info/exclude* within
2. Navigate to the location of your Git repository.
3. Using your favorite text editor, open the file *.git/info/exclude*.
### Further Reading
## Further Reading
* [Ignoring files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) in the Pro Git book
* [.gitignore](https://git-scm.com/docs/gitignore) in the man pages for Git

View File

@@ -22,7 +22,7 @@ versions:
enterprise-server: '*'
github-ae: '*'
---
### Adding a remote repository
## Adding a remote repository
To add a new remote, use the `git remote add` command on the terminal, in the directory your repository is stored at.
@@ -44,7 +44,7 @@ $ git remote -v
For more information on which URL to use, see "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
#### Troubleshooting: Remote origin already exists
### Troubleshooting: Remote origin already exists
This error means you've tried to add a remote with a name that already exists in your local repository.
@@ -58,7 +58,7 @@ To fix this, you can:
* Rename the existing remote repository
* Delete the existing remote repository
### Changing a remote repository's URL
## Changing a remote repository's URL
The `git remote set-url` command changes an existing remote repository URL.
@@ -81,7 +81,7 @@ https://{% data variables.command_line.backticks %}/<em>USERNAME</em>/<em>REPOSI
git@{% data variables.command_line.codeblock %}:<em>USERNAME</em>/<em>REPOSITORY</em>.git
```
#### Switching remote URLs from SSH to HTTPS
### Switching remote URLs from SSH to HTTPS
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to your local project.
@@ -107,7 +107,7 @@ The next time you `git fetch`, `git pull`, or `git push` to the remote repositor
You can [use a credential helper](/github/getting-started-with-github/caching-your-github-credentials-in-git) so Git will remember your GitHub username and personal access token every time it talks to GitHub.
#### Switching remote URLs from HTTPS to SSH
### Switching remote URLs from HTTPS to SSH
{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to your local project.
@@ -129,7 +129,7 @@ You can [use a credential helper](/github/getting-started-with-github/caching-yo
> origin git@{% data variables.command_line.codeblock %}:<em>USERNAME/REPOSITORY</em>.git (push)
```
#### Troubleshooting: No such remote '[name]'
### Troubleshooting: No such remote '[name]'
This error means that the remote you tried to change doesn't exist:
@@ -140,7 +140,7 @@ $ git remote set-url sofake https://{% data variables.command_line.codeblock %}/
Check that you've correctly typed the remote name.
### Renaming a remote repository
## Renaming a remote repository
Use the `git remote rename` command to rename an existing remote.
@@ -148,7 +148,7 @@ The `git remote rename` command takes two arguments:
* An existing remote name, for example, `origin`
* A new name for the remote, for example, `destination`
### Example
## Example
These examples assume you're [cloning using HTTPS](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls), which is recommended.
@@ -167,7 +167,7 @@ $ git remote -v
> destination https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (push)
```
#### Troubleshooting: Could not rename config section 'remote.[old name]' to 'remote.[new name]'
### Troubleshooting: Could not rename config section 'remote.[old name]' to 'remote.[new name]'
This error means that the remote you tried the old remote name you typed doesn't exist.
@@ -180,18 +180,18 @@ $ git remote -v
> origin https://{% data variables.command_line.codeblock %}/<em>OWNER</em>/<em>REPOSITORY</em>.git (push)
```
#### Troubleshooting: Remote [new name] already exists
### Troubleshooting: Remote [new name] already exists
This error means that the remote name you want to use already exists. To solve this, either use a different remote name, or rename the original remote.
### Removing a remote repository
## Removing a remote repository
Use the `git remote rm` command to remove a remote URL from your repository.
The `git remote rm` command takes one argument:
* A remote name, for example, `destination`
### Example
## Example
These examples assume you're [cloning using HTTPS](/github/getting-started-with-github/about-remote-repositories/#cloning-with-https-urls), which is recommended.
@@ -218,7 +218,7 @@ removes the remote and its references from your local repository.
{% endwarning %}
#### Troubleshooting: Could not remove config section 'remote.[name]'
### Troubleshooting: Could not remove config section 'remote.[name]'
This error means that the remote you tried to delete doesn't exist:
@@ -229,6 +229,6 @@ $ git remote rm sofake
Check that you've correctly typed the remote name.
### Further reading
## Further reading
- "[Working with Remotes" from the _Pro Git_ book](https://git-scm.com/book/en/Git-Basics-Working-with-Remotes)

View File

@@ -14,7 +14,7 @@ You can change the name that is associated with your Git commits using the `git
Changing the name associated with your Git commits using `git config` will only affect future commits and will not change the name used for past commits.
### Setting your Git username for *every* repository on your computer
## Setting your Git username for *every* repository on your computer
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -29,7 +29,7 @@ Changing the name associated with your Git commits using `git config` will only
> Mona Lisa
```
### Setting your Git username for a single repository
## Setting your Git username for a single repository
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -46,7 +46,7 @@ Changing the name associated with your Git commits using `git config` will only
> Mona Lisa
```
### Further reading
## Further reading
- "[Setting your commit email address](/articles/setting-your-commit-email-address)"
- ["Git Configuration" from the _Pro Git_ book](https://git-scm.com/book/en/Customizing-Git-Git-Configuration)

View File

@@ -13,7 +13,7 @@ versions:
---
{% data reusables.user_settings.password-authentication-deprecation %}
### Updating your credentials via Keychain Access
## Updating your credentials via Keychain Access
1. Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type `Keychain access` then press the Enter key to launch the app.
![Spotlight Search bar](/assets/images/help/setup/keychain-access.png)
@@ -21,7 +21,7 @@ versions:
3. Find the "internet password" entry for `{% data variables.command_line.backticks %}`.
4. Edit or delete the entry accordingly.
### Deleting your credentials via the command line
## Deleting your credentials via the command line
Through the command line, you can use the credential helper directly to erase the keychain entry.
@@ -34,6 +34,6 @@ protocol=https
If it's successful, nothing will print out. To test that it works, try and clone a private repository from {% data variables.product.product_location %}. If you are prompted for a password, the keychain entry was deleted.
### Further reading
## Further reading
- "[Caching your {% data variables.product.prodname_dotcom %} credentials in Git](/github/getting-started-with-github/caching-your-github-credentials-in-git/)"

View File

@@ -16,7 +16,7 @@ Using an HTTPS remote URL has some advantages compared with using SSH. It's easi
You can avoid being prompted for your password by configuring Git to [cache your credentials](/github/getting-started-with-github/caching-your-github-credentials-in-git) for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.
### Further reading
## Further reading
- "[About remote repositories](/github/getting-started-with-github/about-remote-repositories)."
- "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)"