From 1c9cca5e06a5242fca7ca0717f7392e7b0964871 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Tue, 30 Jun 2015 08:57:17 -0700 Subject: renamed files with hyphen --- doc/gitlab-basics/command-line-commands.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/gitlab-basics/command-line-commands.md (limited to 'doc/gitlab-basics/command-line-commands.md') diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md new file mode 100644 index 00000000000..bad91795528 --- /dev/null +++ b/doc/gitlab-basics/command-line-commands.md @@ -0,0 +1,23 @@ +# Command Line basic commands + +## Start working on your project + +* 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, start by signing in at GitLab.com.. To do it, go to your [gitlab.com](https://gitlab.com) account + +* 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 + +![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 [set up](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](basicsimages/https.png) + +## On the command line + +* To clone your project, go to your computer's shell and type the following command + +``` +git clone PASTE HTTPS HERE +``` + +* A clone of the project will be created in your computer -- cgit v1.2.1 From fddeb0184caf2217644b4372c5f021d1403fc598 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Tue, 30 Jun 2015 09:03:10 -0700 Subject: added new links --- doc/gitlab-basics/command-line-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/gitlab-basics/command-line-commands.md') diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md index bad91795528..4702ad99c10 100644 --- a/doc/gitlab-basics/command-line-commands.md +++ b/doc/gitlab-basics/command-line-commands.md @@ -8,7 +8,7 @@ ![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 [set up](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) +* 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 [set up](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](basicsimages/https.png) -- cgit v1.2.1 From af93e043da1f6568dd95ffcea801947c9786072a Mon Sep 17 00:00:00 2001 From: karen Carias Date: Tue, 30 Jun 2015 09:10:27 -0700 Subject: fixed typo --- doc/gitlab-basics/command-line-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/gitlab-basics/command-line-commands.md') diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md index 4702ad99c10..3edd6760c69 100644 --- a/doc/gitlab-basics/command-line-commands.md +++ b/doc/gitlab-basics/command-line-commands.md @@ -8,7 +8,7 @@ ![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 [set up](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) +* 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](basicsimages/https.png) -- cgit v1.2.1 From 7b7dd96b7d34b67a35338ef67ebc16840183cdc4 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Tue, 30 Jun 2015 12:45:21 -0700 Subject: organized commands --- doc/gitlab-basics/command-line-commands.md | 57 ++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) (limited to 'doc/gitlab-basics/command-line-commands.md') diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md index 3edd6760c69..27d84319092 100644 --- a/doc/gitlab-basics/command-line-commands.md +++ b/doc/gitlab-basics/command-line-commands.md @@ -10,14 +10,65 @@ * 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](basicsimages/https.png) +![Copy the HTTPS or SSH](basicsimages/https.png) ## On the command line * To clone your project, go to your computer's shell and type the following command +``` +git clone PASTE HTTPS OR SSH HERE +``` + +A clone of the project will be created in your computer + +It's important to know some basic commands to work on your shell + +* Go into a project, directory or file to work in it +``` +cd NAME-OF-PROJECT-OR-FILE +``` +* Go back one directory or file ``` -git clone PASTE HTTPS HERE +cd ../ ``` -* A clone of the project will be created in your computer +* To see 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 +#### ADD YOUR INFORMATION +#### Press: control + X +#### Type: Y +#### Press: enter +``` + +* 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 +``` -- cgit v1.2.1 From e0e89858550683f18ae1844c87d7b6fa938b75fe Mon Sep 17 00:00:00 2001 From: karen Carias Date: Tue, 30 Jun 2015 12:49:51 -0700 Subject: small fixes --- doc/gitlab-basics/command-line-commands.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc/gitlab-basics/command-line-commands.md') diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md index 27d84319092..a15e275f27a 100644 --- a/doc/gitlab-basics/command-line-commands.md +++ b/doc/gitlab-basics/command-line-commands.md @@ -19,9 +19,7 @@ git clone PASTE HTTPS OR SSH HERE ``` -A clone of the project will be created in your computer - -It's important to know some basic commands to work on your shell +* A clone of the project will be created in your computer * Go into a project, directory or file to work in it ``` -- cgit v1.2.1