Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f61897b2
Commit
f61897b2
authored
Jan 23, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6ac02795
c051fe6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
doc/gitlab-basics/start-using-git.md
doc/gitlab-basics/start-using-git.md
+48
-0
No files found.
doc/gitlab-basics/start-using-git.md
View file @
f61897b2
...
...
@@ -68,6 +68,54 @@ git config --global --list
## Basic Git commands
Start using Git via the command line with the most basic
commands as described below.
### Clone a repository
To start working locally on an existing remote repository,
clone it with the command
`git clone <repository path>`
.
By cloning a repository, you'll download a copy of its
files into your local computer, preserving the Git
connection with the remote repository.
You can either clone it via HTTPS or
[
SSH
](
../ssh/README.md
)
.
If you chose to clone it via HTTPS, you'll have to enter your
credentials every time you pull and push. With SSH, you enter
your credentials once and can pull and push straightaway.
You can find both paths (HTTPS and SSH) by navigating to
your project's landing page and clicking
**Clone**
. GitLab
will prompt you with both paths, from which you can copy
and paste in your command line.
As an example, consider a repository path:
-
HTTPS:
`https://gitlab.com/gitlab-org/gitlab-ce.git`
-
SSH:
`` git@gitlab.com:gitlab-org/gitlab-ce.git ``
To get started, open a terminal window in the directory
you wish to clone the repository files into, and run one
of the following commands.
Clone via HTTPS:
```
bash
git clone https://gitlab.com/gitlab-org/gitlab-ce.git
```
Clone via SSH:
```
bash
git clone git@gitlab.com:gitlab-org/gitlab-ce.git
```
Both commands will download a copy of the files in a
folder named after the project's name.
You can then navigate to the directory and start working
on it locally.
### Go to the master branch to pull the latest changes from there
```
bash
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment