Skip to content

Commit 88a57a3

Browse files
authored
Add internal links from overview (github#743)
* Add relative URLs * Clean up comments
1 parent cddb1ce commit 88a57a3

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Diff for: git-guides/git-overview.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Whether or not you've worked with version control before, there are a few things
1010

1111
- Branches are lightweight and cheap, so it's OK to have many of them
1212
- Git stores changes in SHA hashes, which work by compressing text files. That makes Git a very good version control system (VCS) for software programming, but not so good for binary files like images or videos.
13-
- Git repositories can be connected, so you can work on one locally on your own machine, and connect it to a shared repository. This way, you can push and pull changes to a repository and easily collaborate with others.
13+
- Git repositories can be connected, so you can work on one locally on your own machine, and connect it to a shared repository. This way, you can [push](/git-guides/git-push) and [pull](/git-guides/git-pull) changes to a repository and easily collaborate with others.
1414

1515
## Why Use Git?
1616

@@ -42,7 +42,7 @@ The benefits of this can't be overstated. Not only does it create a safer enviro
4242

4343
## Getting Started With Git
4444

45-
Depending on your operating system, you may already have Git installed. <!--[Link to installing Git.]--> But, getting started means more than having the software! To get started, it's important to know the basics of how Git works. You may choose to do the actual work within a terminal, an app like GitHub Desktop, or through GitHub.com. (*Note: while you can interact with Git through GitHub.com, your experience may be limited. Many local tools can give you access to the most widely used Git functionalities, though only the terminal will give you access to them all.*)
45+
Depending on your operating system, you may already have [Git installed](/git-guides/install-git). But, getting started means more than having the software! To get started, it's important to know the basics of how Git works. You may choose to do the actual work within a terminal, an app like GitHub Desktop, or through GitHub.com. (*Note: while you can interact with Git through GitHub.com, your experience may be limited. Many local tools can give you access to the most widely used Git functionalities, though only the terminal will give you access to them all.*)
4646

4747
There are _many_ ways to use Git, which doesn't necessarily make it easier! But, the fundamental Git workflow has a few main steps. You can practice all of these in the [Introduction to GitHub Learning Lab course](https://lab.github.com/githubtraining/introduction-to-github).
4848

@@ -56,19 +56,17 @@ Once you've created a branch, and moved the HEAD pointer to it by "checking out"
5656

5757
Next, save your changes. You're ready to start the commit!
5858

59-
<!--Image of staging area, working directory, and history-->
59+
To start your [commit](/git-guides/git-commit), you need to let Git know what changes you'd like to include with `git add [file]`.
6060

61-
To start your commit, you need to let Git know what changes you'd like to include with `git add [file]`.
62-
63-
Once you've saved and staged the changes, you're ready to make the commit with `git commit -m "descriptive commit message"`. <!--link to commit page>
61+
Once you've saved and staged the changes, you're ready to [make the commit](/git-guides/git-commit) with `git commit -m "descriptive commit message"`.
6462

6563
### Push your changes to the remote
6664

6765
So far, if you've made a commit locally, you're the only one that can see it. To let others see your work and begin collaboration, you should "push" your changes using `git push`. If you're pushing from a branch for the first time that you've created locally, you may need to give Git some more information. `git push -u origin [branch-name]` tells Git to push the current branch, and create a branch on the remote that matches it with the same name - and also, create a relationship with that branch, so that `git push` will be enough information in the future.
6866

6967
By default, `git push` only pushes the branch that you're currently checked out to.
7068

71-
Sometimes, if there has been a new commit on the branch on the _remote_, you may be blocked from pushing. Don't worry! Start with a simple `git pull` to incorporate the changes on the remote into your own local branch, resolve any conflicts or finish the merge from the remote into the local branch, and then try the push again.
69+
Sometimes, if there has been a new commit on the branch on the _remote_, you may be blocked from pushing. Don't worry! Start with a simple [`git pull`](/git-guides/git-pull) to incorporate the changes on the remote into your own local branch, resolve any conflicts or finish the merge from the remote into the local branch, and then try the push again.
7270

7371
### Open a pull request
7472

@@ -90,19 +88,15 @@ Once you and your team decide that the pull request looks good, you can merge it
9088

9189
If you choose not to merge the pull request, you can also close pull requests with unmerged changes.
9290

93-
<!--- Potentially include Git workflow illustrations.-->
94-
<!--- “Learning Git” CTA.-->
95-
9691
## How to Use Git
9792

9893
### Learning & Mastering Git Commands
9994

10095
If you're getting started with Git, a great place to start is the [Git Cheat sheet](https://github.github.io/training-kit/). It's translated into many languages, [open source as a part of the `github/training-kit` repository](https://github.com/github/training-kit), and a great starting place for the fundamentals on the command line.
10196

102-
<!--- Very simplified breakdown of the most basic commands with clear navigation to learn more about each one (this might be a good example).-->
10397
Some of the most important and most used commands that you'll find there are:
10498

105-
- `git clone [url]`: Clone (download) a repository that already exists on GitHub, including all of the files, branches, and commits.
99+
- `git clone [url]`: [Clone](/git-guides/git-clone) (download) a repository that already exists on GitHub, including all of the files, branches, and commits.
106100
- `git status`: Always a good idea, this command shows you what branch you're on, what files are in the working or staging directory, and any other important information.
107101
- `git branch`: This shows the existing branches in your local repository. You can also use `git branch [banch-name]` to create a branch from your current location, or `git branch --all` to see all branches, both the local ones on your machine, and the remote tracking branches stored from the last `git pull` or `git fetch` from the remote.
108102
- `git checkout [branch-name]`: Switches to the specified branch and updates the working directory.

0 commit comments

Comments
 (0)