summaryrefslogtreecommitdiff
path: root/doc/gitlab-basics/command-line-commands.md
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-25 02:13:24 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-10-25 02:13:24 +0800
commit600da9ee0bb823e4b14fd45d6ff0e5f0b61b9737 (patch)
treef91eeeee22da72eed5bdf5b87ca27bdc95b136a0 /doc/gitlab-basics/command-line-commands.md
parent40ff7579e9ba025610dfada9703386b4dc657d6d (diff)
parentcb38290ababe43aca0c635fb87d3a38c4c5debcd (diff)
downloadgitlab-ce-19737-read-only-auditor.tar.gz
Merge remote-tracking branch 'upstream/master' into 19737-read-only-auditor19737-read-only-auditor
* upstream/master: (1277 commits) Grapify the labels API Fix typo in project settings that prevents users from enabling container registry. Fix old monitoring links to point to the new location Added path parameter to Commits API fixes build with cache:clear issue Merge branch 'security-fix-leaking-namespace-name' into 'security' Fix authored vote from notes Grapify builds API Add changelog item for groups 404 on relative url Add relative url support to routing contrainers Update project member controller to match recent master logic Add parentheses around return redirect_to method Trigger change even in select2 test helper to produce production-like behaviour Refactor js that disable form submit if no members selected Improve create project member test at project_members_controller_spec Move changelog item to 8.14 Refactor create member tests from group_members_controller_spec Refactor groups/projects members controller Gracefully handle adding of no users to projects and groups Revert "Change "Group#web_url" to return "/groups/twitter" rather than "/twitter"." ...
Diffstat (limited to 'doc/gitlab-basics/command-line-commands.md')
-rw-r--r--doc/gitlab-basics/command-line-commands.md26
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md
index addd3b6b6eb..3b075ff5fc0 100644
--- a/doc/gitlab-basics/command-line-commands.md
+++ b/doc/gitlab-basics/command-line-commands.md
@@ -4,18 +4,21 @@
In Git, when you copy a project you say you "clone" it. To work on a git project locally (from your own computer), you will need to clone it. To do this, sign in to GitLab.
-When you are on your Dashboard, click on the project that you'd like to clone, which you'll find at the right side of your screen.
+When you are on your Dashboard, click on the project that you'd like to clone.
+To work in the project, you can copy a link to the Git repository through a SSH
+or a HTTPS protocol. SSH is easier to use after it's been
+[setup](create-your-ssh-keys.md). While you are at the **Project** tab, select
+HTTPS or SSH from the dropdown menu and copy the link using the 'Copy to clipboard'
+button (you'll have to paste it on your shell in the next step).
-![Select a project](basicsimages/select_project.png)
-
-To work in the project, you can copy a link to the Git repository through a SSH or a HTTPS protocol. SSH is easier to use after it's been [setup](create-your-ssh-keys.md). When you're in the project, click on the HTTPS or SSH button at the right side of your screen. Then copy the link (you'll have to paste it on your shell in the next step).
-
-![Copy the HTTPS or SSH](basicsimages/https.png)
+![Copy the HTTPS or SSH](img/project_clone_url.png)
## On the command line
### Clone your project
+
Go to your computer's shell and type the following command:
+
```
git clone PASTE HTTPS OR SSH HERE
```
@@ -23,26 +26,31 @@ git clone PASTE HTTPS OR SSH HERE
A clone of the project will be created in your computer.
### Go into a project, directory or file to work in it
+
```
cd NAME-OF-PROJECT-OR-FILE
```
### Go back one directory or file
+
```
cd ../
```
### View what’s in the directory that you are in
+
```
ls
```
### Create a directory
+
```
mkdir NAME-OF-YOUR-DIRECTORY
```
### Create a README.md or file in directory
+
```
touch README.md
nano README.md
@@ -53,27 +61,33 @@ nano README.md
```
### Remove a file
+
```
rm NAME-OF-FILE
```
### Remove a directory and all of its contents
+
```
rm -rf NAME-OF-DIRECTORY
```
### View history in the command line
+
```
history
```
### Carry out commands for which the account you are using lacks authority
+
You will be asked for an administrator’s password.
+
```
sudo
```
### Tell where you are
+
```
pwd
```