From 047c074a153684091c562bda74670eaee5892758 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Thu, 25 Jun 2015 08:45:37 -0700 Subject: added new doc command line commands git status --- doc/gitlab_basics/README.md | 2 + doc/gitlab_basics/command_line_commands.md | 134 +++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 doc/gitlab_basics/command_line_commands.md (limited to 'doc') diff --git a/doc/gitlab_basics/README.md b/doc/gitlab_basics/README.md index de56c3ab4fc..7a027326e80 100644 --- a/doc/gitlab_basics/README.md +++ b/doc/gitlab_basics/README.md @@ -5,3 +5,5 @@ Step-by-step guides on the basics of working with Git and GitLab. * [Start using Git on the commandline](start_using_git.md) * [Create and add your SSH Keys](create_your_ssh_keys.md) + +* [Command Line basic commands](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..ee7ab7d1376 --- /dev/null +++ b/doc/gitlab_basics/command_line_commands.md @@ -0,0 +1,134 @@ +# Git Command Line commands + +## Start working on your project + +* You need to add a copy in your computer of all the contents in the project that you’d like to work on. To do it, go to your account in [gitlab.com](https://gitlab.com) + +* When you are on your Dashboard, click on the project that you'd like to copy, which you'll find at the right side of your screen + +![Select a project](basicsimages/select_project.png) + +* When you're in the project, click on the HTTPS button at the right side of your screen. Then copy the HTTPS link (you'll have to paste it on your shell in the next step) + +![Copy the HTTPS](basicsimages/https.png) + +## In your Command Line or shell + +* To add a copy of the project's contents into your computer, go to your computer's shell and type the following command + +``` +git clone PASTE HTTPS HERE +``` + +* A copy of the project will be created in your computer. You'll be able to find it stored as a regular file + +## Basic commands + +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 +``` +cd ../ +``` + +* Go to the master branch to pull the latest changes from there +``` +git checkout master +``` + +* Download the latest changes in the project, so that you work on an up-to-date copy (this is important to do every time you work on a project) +``` +git pull +``` + +* Create a branch (remember that spaces won't be recognized, you need to use a hyphen or underscore) +``` +git checkout -b NAME-OF-BRANCH +``` + +* Work on a branch that has already been created +``` +git checkout NAME-OF-BRANCH +``` + +* To see what’s in the file +``` +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 +``` + +* To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) +``` +git status +``` + +* Add changes to commit (you'll be able to see your changes in red when you type "git status") +``` +git add CHANGES IN RED +git commit -m "DESCRIBE COMMIT IN A FEW WORDS" +``` + +* Send changes to gitlab.com +``` +git push origin NAME-OF-BRANCH +``` + +* Move a file +``` +mv NAME-OF-FILE +``` + +* Rename a file +``` +rn NAME-OF-FILE +``` + +* Remove a file +``` +rm NAME-OF-FILE +``` + +* Remove a directory +``` +rm -r NAME-OF-DIRECTORY +``` + +* Delete changes +``` +git clean -f +``` + +* View history in terminal +``` +history +``` + +* Remove all the changes that you don't want to send to gitlab.com +``` +git add NAME-OF-FILE -all +``` + +* Merge created branch with master branch. You need to be in the created branch +``` +git checkout NAME-OF-BRANCH +git merge master +``` -- cgit v1.2.1 From e8e6bb09a297692370396797bfafb7111a993848 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Thu, 25 Jun 2015 16:44:31 -0700 Subject: fixed clone words --- doc/gitlab_basics/command_line_commands.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/gitlab_basics/command_line_commands.md b/doc/gitlab_basics/command_line_commands.md index ee7ab7d1376..d780f2c47e8 100644 --- a/doc/gitlab_basics/command_line_commands.md +++ b/doc/gitlab_basics/command_line_commands.md @@ -2,9 +2,9 @@ ## Start working on your project -* You need to add a copy in your computer of all the contents in the project that you’d like to work on. To do it, go to your account in [gitlab.com](https://gitlab.com) +* In Git, when you copy a project you say you "clone" it. You need to clone the contents in the project that you’d like to work on to your computer. 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 copy, 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, which you'll find at the right side of your screen ![Select a project](basicsimages/select_project.png) @@ -14,13 +14,13 @@ ## In your Command Line or shell -* To add a copy of the project's contents into your computer, go to your computer's shell and type the following command +* To clone your project, go to your computer's shell and type the following command ``` git clone PASTE HTTPS HERE ``` -* A copy of the project will be created in your computer. You'll be able to find it stored as a regular file +* A clone of the project will be created in your computer. You'll be able to find it stored as a regular file ## Basic commands -- cgit v1.2.1 From 5f38703bdc6a8c0d6193d51155f1d5bf6a30c341 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Mon, 29 Jun 2015 18:53:51 -0700 Subject: split to 2 documents --- doc/gitlab_basics/README.md | 2 + doc/gitlab_basics/basic_git_commands.md | 111 +++++++++++++++++++++++++++ doc/gitlab_basics/command_line_commands.md | 119 +---------------------------- 3 files changed, 117 insertions(+), 115 deletions(-) create mode 100644 doc/gitlab_basics/basic_git_commands.md (limited to 'doc') diff --git a/doc/gitlab_basics/README.md b/doc/gitlab_basics/README.md index 7a027326e80..a2edede5f1c 100644 --- a/doc/gitlab_basics/README.md +++ b/doc/gitlab_basics/README.md @@ -7,3 +7,5 @@ Step-by-step guides on the basics of working with Git and GitLab. * [Create and add your SSH Keys](create_your_ssh_keys.md) * [Command Line basic commands](command_line_commands.md) + +* [Basic Git commands](basic_git_commands.md) diff --git a/doc/gitlab_basics/basic_git_commands.md b/doc/gitlab_basics/basic_git_commands.md new file mode 100644 index 00000000000..895876c41d9 --- /dev/null +++ b/doc/gitlab_basics/basic_git_commands.md @@ -0,0 +1,111 @@ +# Basic Git commands + +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 +``` +cd ../ +``` + +* Go to the master branch to pull the latest changes from there +``` +git checkout master +``` + +* Download the latest changes in the project, so that you work on an up-to-date copy (this is important to do every time you work on a project), while you setup tracking branches +``` +git pull REMOTE NAME-OF-BRANCH -u +``` +(REMOTE: origin) (NAME-OF-BRANCH: could be "master" or an existing branch) + +* Create a branch (remember that spaces won't be recognized, you need to use a hyphen or underscore) +``` +git checkout -b NAME-OF-BRANCH +``` + +* Work on a branch that has already been created +``` +git checkout NAME-OF-BRANCH +``` + +* 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 +``` + +* To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) +``` +git status +``` + +* Add changes to commit (you'll be able to see your changes in red when you type "git status") +``` +git add CHANGES IN RED +git commit -m "DESCRIBE THE INTENTION OF THE COMMIT" +``` + +* Send changes to gitlab.com +``` +git push origin NAME-OF-BRANCH +``` + +* Remove a file +``` +rm NAME-OF-FILE +``` + +* Remove a directory and all of its contents +``` +rm -rf NAME-OF-DIRECTORY +``` + +* Throw away all changes in the Git repository, but leave unstaged things +``` +git checkout . +``` + +* Delete all changes in the Git repository, including untracked files +``` +git clean -f +``` + +* View history in terminal +``` +history +``` + +* Remove all the changes that you don't want to send to gitlab.com +``` +git add NAME-OF-FILE -all +``` + +* Merge created branch with master branch. You need to be in the created branch +``` +git checkout NAME-OF-BRANCH +git merge master +``` + +* Carry out commands for which the account you are using lacks authority. (You will be asked for an administrator’s password) +``` +sudo +``` diff --git a/doc/gitlab_basics/command_line_commands.md b/doc/gitlab_basics/command_line_commands.md index d780f2c47e8..64141187595 100644 --- a/doc/gitlab_basics/command_line_commands.md +++ b/doc/gitlab_basics/command_line_commands.md @@ -2,17 +2,17 @@ ## Start working on your project -* In Git, when you copy a project you say you "clone" it. You need to clone the contents in the project that you’d like to work on to your computer. To do it, go to your [gitlab.com](https://gitlab.com) account +* 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) -* When you're in the project, click on the HTTPS button at the right side of your screen. Then copy the HTTPS 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) -## In your Command Line or shell +## On the command line * To clone your project, go to your computer's shell and type the following command @@ -20,115 +20,4 @@ git clone PASTE HTTPS HERE ``` -* A clone of the project will be created in your computer. You'll be able to find it stored as a regular file - -## Basic commands - -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 -``` -cd ../ -``` - -* Go to the master branch to pull the latest changes from there -``` -git checkout master -``` - -* Download the latest changes in the project, so that you work on an up-to-date copy (this is important to do every time you work on a project) -``` -git pull -``` - -* Create a branch (remember that spaces won't be recognized, you need to use a hyphen or underscore) -``` -git checkout -b NAME-OF-BRANCH -``` - -* Work on a branch that has already been created -``` -git checkout NAME-OF-BRANCH -``` - -* To see what’s in the file -``` -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 -``` - -* To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) -``` -git status -``` - -* Add changes to commit (you'll be able to see your changes in red when you type "git status") -``` -git add CHANGES IN RED -git commit -m "DESCRIBE COMMIT IN A FEW WORDS" -``` - -* Send changes to gitlab.com -``` -git push origin NAME-OF-BRANCH -``` - -* Move a file -``` -mv NAME-OF-FILE -``` - -* Rename a file -``` -rn NAME-OF-FILE -``` - -* Remove a file -``` -rm NAME-OF-FILE -``` - -* Remove a directory -``` -rm -r NAME-OF-DIRECTORY -``` - -* Delete changes -``` -git clean -f -``` - -* View history in terminal -``` -history -``` - -* Remove all the changes that you don't want to send to gitlab.com -``` -git add NAME-OF-FILE -all -``` - -* Merge created branch with master branch. You need to be in the created branch -``` -git checkout NAME-OF-BRANCH -git merge master -``` +* A clone of the project will be created in your computer -- cgit v1.2.1 From 437ecdf2b01de1983fc5262f064323de706027c9 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Mon, 29 Jun 2015 19:03:17 -0700 Subject: fixed title --- doc/gitlab_basics/command_line_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/gitlab_basics/command_line_commands.md b/doc/gitlab_basics/command_line_commands.md index 64141187595..bad91795528 100644 --- a/doc/gitlab_basics/command_line_commands.md +++ b/doc/gitlab_basics/command_line_commands.md @@ -1,4 +1,4 @@ -# Git Command Line commands +# Command Line basic commands ## Start working on your project -- cgit v1.2.1 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/README.md | 11 ++ doc/gitlab-basics/basic-git-commands.md | 111 +++++++++++++++++++++ .../basicsimages/add_new_merge_request.png | Bin 0 -> 9467 bytes doc/gitlab-basics/basicsimages/add_sshkey.png | Bin 0 -> 1463 bytes doc/gitlab-basics/basicsimages/branch_info.png | Bin 0 -> 7978 bytes doc/gitlab-basics/basicsimages/branch_name.png | Bin 0 -> 2199 bytes doc/gitlab-basics/basicsimages/branches.png | Bin 0 -> 3653 bytes doc/gitlab-basics/basicsimages/commit_changes.png | Bin 0 -> 5567 bytes doc/gitlab-basics/basicsimages/commit_message.png | Bin 0 -> 5707 bytes doc/gitlab-basics/basicsimages/commits.png | Bin 0 -> 4258 bytes doc/gitlab-basics/basicsimages/compare_braches.png | Bin 0 -> 1624 bytes doc/gitlab-basics/basicsimages/create_file.png | Bin 0 -> 2524 bytes doc/gitlab-basics/basicsimages/create_group.png | Bin 0 -> 3224 bytes doc/gitlab-basics/basicsimages/edit_file.png | Bin 0 -> 2259 bytes doc/gitlab-basics/basicsimages/file_located.png | Bin 0 -> 3156 bytes doc/gitlab-basics/basicsimages/file_name.png | Bin 0 -> 2544 bytes doc/gitlab-basics/basicsimages/find_file.png | Bin 0 -> 8840 bytes doc/gitlab-basics/basicsimages/find_group.png | Bin 0 -> 6159 bytes doc/gitlab-basics/basicsimages/fork.png | Bin 0 -> 1046 bytes doc/gitlab-basics/basicsimages/group_info.png | Bin 0 -> 16217 bytes doc/gitlab-basics/basicsimages/groups.png | Bin 0 -> 4857 bytes doc/gitlab-basics/basicsimages/https.png | Bin 0 -> 2887 bytes doc/gitlab-basics/basicsimages/image_file.png | Bin 0 -> 2939 bytes doc/gitlab-basics/basicsimages/issue_title.png | Bin 0 -> 9059 bytes doc/gitlab-basics/basicsimages/issues.png | Bin 0 -> 4332 bytes doc/gitlab-basics/basicsimages/key.png | Bin 0 -> 1264 bytes doc/gitlab-basics/basicsimages/merge_requests.png | Bin 0 -> 4381 bytes doc/gitlab-basics/basicsimages/new_issue.png | Bin 0 -> 2974 bytes .../basicsimages/new_merge_request.png | Bin 0 -> 3227 bytes doc/gitlab-basics/basicsimages/new_project.png | Bin 0 -> 2319 bytes doc/gitlab-basics/basicsimages/newbranch.png | Bin 0 -> 1314 bytes doc/gitlab-basics/basicsimages/paste_sshkey.png | Bin 0 -> 8620 bytes .../basicsimages/profile_settings.png | Bin 0 -> 1194 bytes doc/gitlab-basics/basicsimages/project_info.png | Bin 0 -> 21862 bytes .../basicsimages/public_file_link.png | Bin 0 -> 3038 bytes doc/gitlab-basics/basicsimages/select_branch.png | Bin 0 -> 12213 bytes doc/gitlab-basics/basicsimages/select_project.png | Bin 0 -> 16832 bytes doc/gitlab-basics/basicsimages/settings.png | Bin 0 -> 4321 bytes doc/gitlab-basics/basicsimages/shh_keys.png | Bin 0 -> 4981 bytes .../basicsimages/submit_new_issue.png | Bin 0 -> 9083 bytes .../basicsimages/title_description_mr.png | Bin 0 -> 12749 bytes doc/gitlab-basics/basicsimages/white_space.png | Bin 0 -> 3707 bytes doc/gitlab-basics/command-line-commands.md | 23 +++++ doc/gitlab-basics/create-your-ssh-keys.md | 37 +++++++ doc/gitlab-basics/start-using-git.md | 67 +++++++++++++ doc/gitlab_basics/README.md | 11 -- doc/gitlab_basics/basic_git_commands.md | 111 --------------------- .../basicsimages/add_new_merge_request.png | Bin 9467 -> 0 bytes doc/gitlab_basics/basicsimages/add_sshkey.png | Bin 1463 -> 0 bytes doc/gitlab_basics/basicsimages/branch_info.png | Bin 7978 -> 0 bytes doc/gitlab_basics/basicsimages/branch_name.png | Bin 2199 -> 0 bytes doc/gitlab_basics/basicsimages/branches.png | Bin 3653 -> 0 bytes doc/gitlab_basics/basicsimages/commit_changes.png | Bin 5567 -> 0 bytes doc/gitlab_basics/basicsimages/commit_message.png | Bin 5707 -> 0 bytes doc/gitlab_basics/basicsimages/commits.png | Bin 4258 -> 0 bytes doc/gitlab_basics/basicsimages/compare_braches.png | Bin 1624 -> 0 bytes doc/gitlab_basics/basicsimages/create_file.png | Bin 2524 -> 0 bytes doc/gitlab_basics/basicsimages/create_group.png | Bin 3224 -> 0 bytes doc/gitlab_basics/basicsimages/edit_file.png | Bin 2259 -> 0 bytes doc/gitlab_basics/basicsimages/file_located.png | Bin 3156 -> 0 bytes doc/gitlab_basics/basicsimages/file_name.png | Bin 2544 -> 0 bytes doc/gitlab_basics/basicsimages/find_file.png | Bin 8840 -> 0 bytes doc/gitlab_basics/basicsimages/find_group.png | Bin 6159 -> 0 bytes doc/gitlab_basics/basicsimages/fork.png | Bin 1046 -> 0 bytes doc/gitlab_basics/basicsimages/group_info.png | Bin 16217 -> 0 bytes doc/gitlab_basics/basicsimages/groups.png | Bin 4857 -> 0 bytes doc/gitlab_basics/basicsimages/https.png | Bin 2887 -> 0 bytes doc/gitlab_basics/basicsimages/image_file.png | Bin 2939 -> 0 bytes doc/gitlab_basics/basicsimages/issue_title.png | Bin 9059 -> 0 bytes doc/gitlab_basics/basicsimages/issues.png | Bin 4332 -> 0 bytes doc/gitlab_basics/basicsimages/key.png | Bin 1264 -> 0 bytes doc/gitlab_basics/basicsimages/merge_requests.png | Bin 4381 -> 0 bytes doc/gitlab_basics/basicsimages/new_issue.png | Bin 2974 -> 0 bytes .../basicsimages/new_merge_request.png | Bin 3227 -> 0 bytes doc/gitlab_basics/basicsimages/new_project.png | Bin 2319 -> 0 bytes doc/gitlab_basics/basicsimages/newbranch.png | Bin 1314 -> 0 bytes doc/gitlab_basics/basicsimages/paste_sshkey.png | Bin 8620 -> 0 bytes .../basicsimages/profile_settings.png | Bin 1194 -> 0 bytes doc/gitlab_basics/basicsimages/project_info.png | Bin 21862 -> 0 bytes .../basicsimages/public_file_link.png | Bin 3038 -> 0 bytes doc/gitlab_basics/basicsimages/select_branch.png | Bin 12213 -> 0 bytes doc/gitlab_basics/basicsimages/select_project.png | Bin 16832 -> 0 bytes doc/gitlab_basics/basicsimages/settings.png | Bin 4321 -> 0 bytes doc/gitlab_basics/basicsimages/shh_keys.png | Bin 4981 -> 0 bytes .../basicsimages/submit_new_issue.png | Bin 9083 -> 0 bytes .../basicsimages/title_description_mr.png | Bin 12749 -> 0 bytes doc/gitlab_basics/basicsimages/white_space.png | Bin 3707 -> 0 bytes doc/gitlab_basics/command_line_commands.md | 23 ----- doc/gitlab_basics/create_your_ssh_keys.md | 37 ------- doc/gitlab_basics/start_using_git.md | 67 ------------- 90 files changed, 249 insertions(+), 249 deletions(-) create mode 100644 doc/gitlab-basics/README.md create mode 100644 doc/gitlab-basics/basic-git-commands.md create mode 100644 doc/gitlab-basics/basicsimages/add_new_merge_request.png create mode 100644 doc/gitlab-basics/basicsimages/add_sshkey.png create mode 100644 doc/gitlab-basics/basicsimages/branch_info.png create mode 100644 doc/gitlab-basics/basicsimages/branch_name.png create mode 100644 doc/gitlab-basics/basicsimages/branches.png create mode 100644 doc/gitlab-basics/basicsimages/commit_changes.png create mode 100644 doc/gitlab-basics/basicsimages/commit_message.png create mode 100644 doc/gitlab-basics/basicsimages/commits.png create mode 100644 doc/gitlab-basics/basicsimages/compare_braches.png create mode 100644 doc/gitlab-basics/basicsimages/create_file.png create mode 100644 doc/gitlab-basics/basicsimages/create_group.png create mode 100644 doc/gitlab-basics/basicsimages/edit_file.png create mode 100644 doc/gitlab-basics/basicsimages/file_located.png create mode 100644 doc/gitlab-basics/basicsimages/file_name.png create mode 100644 doc/gitlab-basics/basicsimages/find_file.png create mode 100644 doc/gitlab-basics/basicsimages/find_group.png create mode 100644 doc/gitlab-basics/basicsimages/fork.png create mode 100644 doc/gitlab-basics/basicsimages/group_info.png create mode 100644 doc/gitlab-basics/basicsimages/groups.png create mode 100644 doc/gitlab-basics/basicsimages/https.png create mode 100644 doc/gitlab-basics/basicsimages/image_file.png create mode 100644 doc/gitlab-basics/basicsimages/issue_title.png create mode 100644 doc/gitlab-basics/basicsimages/issues.png create mode 100644 doc/gitlab-basics/basicsimages/key.png create mode 100644 doc/gitlab-basics/basicsimages/merge_requests.png create mode 100644 doc/gitlab-basics/basicsimages/new_issue.png create mode 100644 doc/gitlab-basics/basicsimages/new_merge_request.png create mode 100644 doc/gitlab-basics/basicsimages/new_project.png create mode 100644 doc/gitlab-basics/basicsimages/newbranch.png create mode 100644 doc/gitlab-basics/basicsimages/paste_sshkey.png create mode 100644 doc/gitlab-basics/basicsimages/profile_settings.png create mode 100644 doc/gitlab-basics/basicsimages/project_info.png create mode 100644 doc/gitlab-basics/basicsimages/public_file_link.png create mode 100644 doc/gitlab-basics/basicsimages/select_branch.png create mode 100644 doc/gitlab-basics/basicsimages/select_project.png create mode 100644 doc/gitlab-basics/basicsimages/settings.png create mode 100644 doc/gitlab-basics/basicsimages/shh_keys.png create mode 100644 doc/gitlab-basics/basicsimages/submit_new_issue.png create mode 100644 doc/gitlab-basics/basicsimages/title_description_mr.png create mode 100644 doc/gitlab-basics/basicsimages/white_space.png create mode 100644 doc/gitlab-basics/command-line-commands.md create mode 100644 doc/gitlab-basics/create-your-ssh-keys.md create mode 100644 doc/gitlab-basics/start-using-git.md delete mode 100644 doc/gitlab_basics/README.md delete mode 100644 doc/gitlab_basics/basic_git_commands.md delete mode 100644 doc/gitlab_basics/basicsimages/add_new_merge_request.png delete mode 100644 doc/gitlab_basics/basicsimages/add_sshkey.png delete mode 100644 doc/gitlab_basics/basicsimages/branch_info.png delete mode 100644 doc/gitlab_basics/basicsimages/branch_name.png delete mode 100644 doc/gitlab_basics/basicsimages/branches.png delete mode 100644 doc/gitlab_basics/basicsimages/commit_changes.png delete mode 100644 doc/gitlab_basics/basicsimages/commit_message.png delete mode 100644 doc/gitlab_basics/basicsimages/commits.png delete mode 100644 doc/gitlab_basics/basicsimages/compare_braches.png delete mode 100644 doc/gitlab_basics/basicsimages/create_file.png delete mode 100644 doc/gitlab_basics/basicsimages/create_group.png delete mode 100644 doc/gitlab_basics/basicsimages/edit_file.png delete mode 100644 doc/gitlab_basics/basicsimages/file_located.png delete mode 100644 doc/gitlab_basics/basicsimages/file_name.png delete mode 100644 doc/gitlab_basics/basicsimages/find_file.png delete mode 100644 doc/gitlab_basics/basicsimages/find_group.png delete mode 100644 doc/gitlab_basics/basicsimages/fork.png delete mode 100644 doc/gitlab_basics/basicsimages/group_info.png delete mode 100644 doc/gitlab_basics/basicsimages/groups.png delete mode 100644 doc/gitlab_basics/basicsimages/https.png delete mode 100644 doc/gitlab_basics/basicsimages/image_file.png delete mode 100644 doc/gitlab_basics/basicsimages/issue_title.png delete mode 100644 doc/gitlab_basics/basicsimages/issues.png delete mode 100644 doc/gitlab_basics/basicsimages/key.png delete mode 100644 doc/gitlab_basics/basicsimages/merge_requests.png delete mode 100644 doc/gitlab_basics/basicsimages/new_issue.png delete mode 100644 doc/gitlab_basics/basicsimages/new_merge_request.png delete mode 100644 doc/gitlab_basics/basicsimages/new_project.png delete mode 100644 doc/gitlab_basics/basicsimages/newbranch.png delete mode 100644 doc/gitlab_basics/basicsimages/paste_sshkey.png delete mode 100644 doc/gitlab_basics/basicsimages/profile_settings.png delete mode 100644 doc/gitlab_basics/basicsimages/project_info.png delete mode 100644 doc/gitlab_basics/basicsimages/public_file_link.png delete mode 100644 doc/gitlab_basics/basicsimages/select_branch.png delete mode 100644 doc/gitlab_basics/basicsimages/select_project.png delete mode 100644 doc/gitlab_basics/basicsimages/settings.png delete mode 100644 doc/gitlab_basics/basicsimages/shh_keys.png delete mode 100644 doc/gitlab_basics/basicsimages/submit_new_issue.png delete mode 100644 doc/gitlab_basics/basicsimages/title_description_mr.png delete mode 100644 doc/gitlab_basics/basicsimages/white_space.png delete mode 100644 doc/gitlab_basics/command_line_commands.md delete mode 100644 doc/gitlab_basics/create_your_ssh_keys.md delete mode 100644 doc/gitlab_basics/start_using_git.md (limited to 'doc') diff --git a/doc/gitlab-basics/README.md b/doc/gitlab-basics/README.md new file mode 100644 index 00000000000..a2edede5f1c --- /dev/null +++ b/doc/gitlab-basics/README.md @@ -0,0 +1,11 @@ +# GitLab basics + +Step-by-step guides on the basics of working with Git and GitLab. + +* [Start using Git on the commandline](start_using_git.md) + +* [Create and add your SSH Keys](create_your_ssh_keys.md) + +* [Command Line basic commands](command_line_commands.md) + +* [Basic Git commands](basic_git_commands.md) diff --git a/doc/gitlab-basics/basic-git-commands.md b/doc/gitlab-basics/basic-git-commands.md new file mode 100644 index 00000000000..895876c41d9 --- /dev/null +++ b/doc/gitlab-basics/basic-git-commands.md @@ -0,0 +1,111 @@ +# Basic Git commands + +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 +``` +cd ../ +``` + +* Go to the master branch to pull the latest changes from there +``` +git checkout master +``` + +* Download the latest changes in the project, so that you work on an up-to-date copy (this is important to do every time you work on a project), while you setup tracking branches +``` +git pull REMOTE NAME-OF-BRANCH -u +``` +(REMOTE: origin) (NAME-OF-BRANCH: could be "master" or an existing branch) + +* Create a branch (remember that spaces won't be recognized, you need to use a hyphen or underscore) +``` +git checkout -b NAME-OF-BRANCH +``` + +* Work on a branch that has already been created +``` +git checkout NAME-OF-BRANCH +``` + +* 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 +``` + +* To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) +``` +git status +``` + +* Add changes to commit (you'll be able to see your changes in red when you type "git status") +``` +git add CHANGES IN RED +git commit -m "DESCRIBE THE INTENTION OF THE COMMIT" +``` + +* Send changes to gitlab.com +``` +git push origin NAME-OF-BRANCH +``` + +* Remove a file +``` +rm NAME-OF-FILE +``` + +* Remove a directory and all of its contents +``` +rm -rf NAME-OF-DIRECTORY +``` + +* Throw away all changes in the Git repository, but leave unstaged things +``` +git checkout . +``` + +* Delete all changes in the Git repository, including untracked files +``` +git clean -f +``` + +* View history in terminal +``` +history +``` + +* Remove all the changes that you don't want to send to gitlab.com +``` +git add NAME-OF-FILE -all +``` + +* Merge created branch with master branch. You need to be in the created branch +``` +git checkout NAME-OF-BRANCH +git merge master +``` + +* Carry out commands for which the account you are using lacks authority. (You will be asked for an administrator’s password) +``` +sudo +``` diff --git a/doc/gitlab-basics/basicsimages/add_new_merge_request.png b/doc/gitlab-basics/basicsimages/add_new_merge_request.png new file mode 100644 index 00000000000..9d93b217a59 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/add_new_merge_request.png differ diff --git a/doc/gitlab-basics/basicsimages/add_sshkey.png b/doc/gitlab-basics/basicsimages/add_sshkey.png new file mode 100644 index 00000000000..2dede97aa40 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/add_sshkey.png differ diff --git a/doc/gitlab-basics/basicsimages/branch_info.png b/doc/gitlab-basics/basicsimages/branch_info.png new file mode 100644 index 00000000000..c5e38b552a5 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/branch_info.png differ diff --git a/doc/gitlab-basics/basicsimages/branch_name.png b/doc/gitlab-basics/basicsimages/branch_name.png new file mode 100644 index 00000000000..06e77f5eea9 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/branch_name.png differ diff --git a/doc/gitlab-basics/basicsimages/branches.png b/doc/gitlab-basics/basicsimages/branches.png new file mode 100644 index 00000000000..c18fa83b968 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/branches.png differ diff --git a/doc/gitlab-basics/basicsimages/commit_changes.png b/doc/gitlab-basics/basicsimages/commit_changes.png new file mode 100644 index 00000000000..81588336f37 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/commit_changes.png differ diff --git a/doc/gitlab-basics/basicsimages/commit_message.png b/doc/gitlab-basics/basicsimages/commit_message.png new file mode 100644 index 00000000000..0df2c32653c Binary files /dev/null and b/doc/gitlab-basics/basicsimages/commit_message.png differ diff --git a/doc/gitlab-basics/basicsimages/commits.png b/doc/gitlab-basics/basicsimages/commits.png new file mode 100644 index 00000000000..7e606539077 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/commits.png differ diff --git a/doc/gitlab-basics/basicsimages/compare_braches.png b/doc/gitlab-basics/basicsimages/compare_braches.png new file mode 100644 index 00000000000..7eebaed9075 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/compare_braches.png differ diff --git a/doc/gitlab-basics/basicsimages/create_file.png b/doc/gitlab-basics/basicsimages/create_file.png new file mode 100644 index 00000000000..688e355cca2 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/create_file.png differ diff --git a/doc/gitlab-basics/basicsimages/create_group.png b/doc/gitlab-basics/basicsimages/create_group.png new file mode 100644 index 00000000000..57da898abdc Binary files /dev/null and b/doc/gitlab-basics/basicsimages/create_group.png differ diff --git a/doc/gitlab-basics/basicsimages/edit_file.png b/doc/gitlab-basics/basicsimages/edit_file.png new file mode 100644 index 00000000000..afa68760108 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/edit_file.png differ diff --git a/doc/gitlab-basics/basicsimages/file_located.png b/doc/gitlab-basics/basicsimages/file_located.png new file mode 100644 index 00000000000..1def489d16b Binary files /dev/null and b/doc/gitlab-basics/basicsimages/file_located.png differ diff --git a/doc/gitlab-basics/basicsimages/file_name.png b/doc/gitlab-basics/basicsimages/file_name.png new file mode 100644 index 00000000000..9ac2f1c355f Binary files /dev/null and b/doc/gitlab-basics/basicsimages/file_name.png differ diff --git a/doc/gitlab-basics/basicsimages/find_file.png b/doc/gitlab-basics/basicsimages/find_file.png new file mode 100644 index 00000000000..98639149a39 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/find_file.png differ diff --git a/doc/gitlab-basics/basicsimages/find_group.png b/doc/gitlab-basics/basicsimages/find_group.png new file mode 100644 index 00000000000..5ac33c7e953 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/find_group.png differ diff --git a/doc/gitlab-basics/basicsimages/fork.png b/doc/gitlab-basics/basicsimages/fork.png new file mode 100644 index 00000000000..b1f94938613 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/fork.png differ diff --git a/doc/gitlab-basics/basicsimages/group_info.png b/doc/gitlab-basics/basicsimages/group_info.png new file mode 100644 index 00000000000..e78d84e4d80 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/group_info.png differ diff --git a/doc/gitlab-basics/basicsimages/groups.png b/doc/gitlab-basics/basicsimages/groups.png new file mode 100644 index 00000000000..b8104343afa Binary files /dev/null and b/doc/gitlab-basics/basicsimages/groups.png differ diff --git a/doc/gitlab-basics/basicsimages/https.png b/doc/gitlab-basics/basicsimages/https.png new file mode 100644 index 00000000000..2a31b4cf751 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/https.png differ diff --git a/doc/gitlab-basics/basicsimages/image_file.png b/doc/gitlab-basics/basicsimages/image_file.png new file mode 100644 index 00000000000..1061d9c5082 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/image_file.png differ diff --git a/doc/gitlab-basics/basicsimages/issue_title.png b/doc/gitlab-basics/basicsimages/issue_title.png new file mode 100644 index 00000000000..7b69c705392 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/issue_title.png differ diff --git a/doc/gitlab-basics/basicsimages/issues.png b/doc/gitlab-basics/basicsimages/issues.png new file mode 100644 index 00000000000..9354d05319e Binary files /dev/null and b/doc/gitlab-basics/basicsimages/issues.png differ diff --git a/doc/gitlab-basics/basicsimages/key.png b/doc/gitlab-basics/basicsimages/key.png new file mode 100644 index 00000000000..321805cda98 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/key.png differ diff --git a/doc/gitlab-basics/basicsimages/merge_requests.png b/doc/gitlab-basics/basicsimages/merge_requests.png new file mode 100644 index 00000000000..7601d40de47 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/merge_requests.png differ diff --git a/doc/gitlab-basics/basicsimages/new_issue.png b/doc/gitlab-basics/basicsimages/new_issue.png new file mode 100644 index 00000000000..94e7503dd8b Binary files /dev/null and b/doc/gitlab-basics/basicsimages/new_issue.png differ diff --git a/doc/gitlab-basics/basicsimages/new_merge_request.png b/doc/gitlab-basics/basicsimages/new_merge_request.png new file mode 100644 index 00000000000..9120d2b1ab1 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/new_merge_request.png differ diff --git a/doc/gitlab-basics/basicsimages/new_project.png b/doc/gitlab-basics/basicsimages/new_project.png new file mode 100644 index 00000000000..ac255270a66 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/new_project.png differ diff --git a/doc/gitlab-basics/basicsimages/newbranch.png b/doc/gitlab-basics/basicsimages/newbranch.png new file mode 100644 index 00000000000..da1a6b604ea Binary files /dev/null and b/doc/gitlab-basics/basicsimages/newbranch.png differ diff --git a/doc/gitlab-basics/basicsimages/paste_sshkey.png b/doc/gitlab-basics/basicsimages/paste_sshkey.png new file mode 100644 index 00000000000..9880ddfead1 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/paste_sshkey.png differ diff --git a/doc/gitlab-basics/basicsimages/profile_settings.png b/doc/gitlab-basics/basicsimages/profile_settings.png new file mode 100644 index 00000000000..5f2e7a7e10c Binary files /dev/null and b/doc/gitlab-basics/basicsimages/profile_settings.png differ diff --git a/doc/gitlab-basics/basicsimages/project_info.png b/doc/gitlab-basics/basicsimages/project_info.png new file mode 100644 index 00000000000..6c06ff351fa Binary files /dev/null and b/doc/gitlab-basics/basicsimages/project_info.png differ diff --git a/doc/gitlab-basics/basicsimages/public_file_link.png b/doc/gitlab-basics/basicsimages/public_file_link.png new file mode 100644 index 00000000000..1a60a3d880a Binary files /dev/null and b/doc/gitlab-basics/basicsimages/public_file_link.png differ diff --git a/doc/gitlab-basics/basicsimages/select_branch.png b/doc/gitlab-basics/basicsimages/select_branch.png new file mode 100644 index 00000000000..3475b2df576 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/select_branch.png differ diff --git a/doc/gitlab-basics/basicsimages/select_project.png b/doc/gitlab-basics/basicsimages/select_project.png new file mode 100644 index 00000000000..6d5aa439124 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/select_project.png differ diff --git a/doc/gitlab-basics/basicsimages/settings.png b/doc/gitlab-basics/basicsimages/settings.png new file mode 100644 index 00000000000..9bf9c5a0d39 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/settings.png differ diff --git a/doc/gitlab-basics/basicsimages/shh_keys.png b/doc/gitlab-basics/basicsimages/shh_keys.png new file mode 100644 index 00000000000..d7ef4dafe77 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/shh_keys.png differ diff --git a/doc/gitlab-basics/basicsimages/submit_new_issue.png b/doc/gitlab-basics/basicsimages/submit_new_issue.png new file mode 100644 index 00000000000..18944417085 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/submit_new_issue.png differ diff --git a/doc/gitlab-basics/basicsimages/title_description_mr.png b/doc/gitlab-basics/basicsimages/title_description_mr.png new file mode 100644 index 00000000000..e08eb628414 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/title_description_mr.png differ diff --git a/doc/gitlab-basics/basicsimages/white_space.png b/doc/gitlab-basics/basicsimages/white_space.png new file mode 100644 index 00000000000..6363a09360e Binary files /dev/null and b/doc/gitlab-basics/basicsimages/white_space.png differ 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 diff --git a/doc/gitlab-basics/create-your-ssh-keys.md b/doc/gitlab-basics/create-your-ssh-keys.md new file mode 100644 index 00000000000..1e7f7c28513 --- /dev/null +++ b/doc/gitlab-basics/create-your-ssh-keys.md @@ -0,0 +1,37 @@ +# How to create your SSH Keys + +You need to connect your computer to your GitLab account through SSH Keys. They are unique for every computer that you link your GitLab account with. + +## Generate your SSH Key + +* Create an account on GitLab. Sign up and check your email for your confirmation link + +* After you confirm, go to [gitlab.com](https://about.gitlab.com/) and sign in to your account + +## Add your SSH Key + +* At the top right corner, click on "profile settings" + +![profile settings](basicsimages/profile_settings.png) + +* On the left side menu click on "SSH Keys" + +![SSH Keys](basicsimages/shh_keys.png) + +* Then click on the green button "Add SSH Key" + +![Add SSH Key](basicsimages/add_sshkey.png) + +* There, you should paste the SSH Key that your commandline will generate for you. Below you'll find the steps to generate it + +![Paste SSH Key](basicsimages/paste_sshkey.png) + +## To generate an SSH Key on your commandline + +* Go to your [commandline](start_using_git.md) and follow the [instructions](https://gitlab.com/help/ssh/README) to generate it + +* Copy the SSH Key that your commandline created and paste it on the "Key" box on the GitLab page. The title will be added automatically + +![Paste SSH Key](basicsimages/key.png) + +* Now, you'll be able to use Git over SSH, instead of Git over HTTP. diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md new file mode 100644 index 00000000000..99103469ccc --- /dev/null +++ b/doc/gitlab-basics/start-using-git.md @@ -0,0 +1,67 @@ +# Start using Git on the commandline + +If you want to start using a Git and GitLab, make sure that you have created an account on [gitlab.com](https://about.gitlab.com/) + +## Open a shell + +* Depending on your operating system, find the shell of your preference. Here are some suggestions + +- [Terminal](http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line) on Mac OSX + +- [GitBash](https://msysgit.github.io) on Windows + +- [Linux Terminal](http://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/) on Linux + +## Check if Git has already been installed + +* Git is usually preinstalled on Mac and Linux + +* Type the following command and then press enter + +``` +git --version +``` + +* You should receive a message that will tell you which Git version you have in your computer. If you don’t receive a "Git version" message, it means that you need to [download Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) + +* If Git doesn't automatically download, there's an option on the website to [download manually](https://git-scm.com/downloads). Then follow the steps on the installation window + +* After you finished installing, open a new shell and type "git --version" again to verify that it was correctly installed + +## Add your Git username and set your email + +* It is important because every Git commit that you create will use this information + +* On your shell, type the following command to add your username + +``` +git config --global user.name ADD YOUR USERNAME +``` + +* Then verify that you have the correct username + +``` +git config --global user.name +``` + +* To set your email address, type the following command + +``` +git config --global user.email ADD YOUR EMAIL +``` + +* To verify that you entered your email correctly, type + +``` +git config --global user.email +``` + +* You'll need to do this only once because you are using the "--global" option. It tells Git to always use this information for anything you do on that system. If you want to override this with a different username or email address for specific projects, you can run the command without the "--global" option when you’re in that project + +## Check your information + +* To view the information that you entered, type + +``` +git config --global --list +``` diff --git a/doc/gitlab_basics/README.md b/doc/gitlab_basics/README.md deleted file mode 100644 index a2edede5f1c..00000000000 --- a/doc/gitlab_basics/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# GitLab basics - -Step-by-step guides on the basics of working with Git and GitLab. - -* [Start using Git on the commandline](start_using_git.md) - -* [Create and add your SSH Keys](create_your_ssh_keys.md) - -* [Command Line basic commands](command_line_commands.md) - -* [Basic Git commands](basic_git_commands.md) diff --git a/doc/gitlab_basics/basic_git_commands.md b/doc/gitlab_basics/basic_git_commands.md deleted file mode 100644 index 895876c41d9..00000000000 --- a/doc/gitlab_basics/basic_git_commands.md +++ /dev/null @@ -1,111 +0,0 @@ -# Basic Git commands - -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 -``` -cd ../ -``` - -* Go to the master branch to pull the latest changes from there -``` -git checkout master -``` - -* Download the latest changes in the project, so that you work on an up-to-date copy (this is important to do every time you work on a project), while you setup tracking branches -``` -git pull REMOTE NAME-OF-BRANCH -u -``` -(REMOTE: origin) (NAME-OF-BRANCH: could be "master" or an existing branch) - -* Create a branch (remember that spaces won't be recognized, you need to use a hyphen or underscore) -``` -git checkout -b NAME-OF-BRANCH -``` - -* Work on a branch that has already been created -``` -git checkout NAME-OF-BRANCH -``` - -* 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 -``` - -* To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) -``` -git status -``` - -* Add changes to commit (you'll be able to see your changes in red when you type "git status") -``` -git add CHANGES IN RED -git commit -m "DESCRIBE THE INTENTION OF THE COMMIT" -``` - -* Send changes to gitlab.com -``` -git push origin NAME-OF-BRANCH -``` - -* Remove a file -``` -rm NAME-OF-FILE -``` - -* Remove a directory and all of its contents -``` -rm -rf NAME-OF-DIRECTORY -``` - -* Throw away all changes in the Git repository, but leave unstaged things -``` -git checkout . -``` - -* Delete all changes in the Git repository, including untracked files -``` -git clean -f -``` - -* View history in terminal -``` -history -``` - -* Remove all the changes that you don't want to send to gitlab.com -``` -git add NAME-OF-FILE -all -``` - -* Merge created branch with master branch. You need to be in the created branch -``` -git checkout NAME-OF-BRANCH -git merge master -``` - -* Carry out commands for which the account you are using lacks authority. (You will be asked for an administrator’s password) -``` -sudo -``` diff --git a/doc/gitlab_basics/basicsimages/add_new_merge_request.png b/doc/gitlab_basics/basicsimages/add_new_merge_request.png deleted file mode 100644 index 9d93b217a59..00000000000 Binary files a/doc/gitlab_basics/basicsimages/add_new_merge_request.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/add_sshkey.png b/doc/gitlab_basics/basicsimages/add_sshkey.png deleted file mode 100644 index 2dede97aa40..00000000000 Binary files a/doc/gitlab_basics/basicsimages/add_sshkey.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/branch_info.png b/doc/gitlab_basics/basicsimages/branch_info.png deleted file mode 100644 index c5e38b552a5..00000000000 Binary files a/doc/gitlab_basics/basicsimages/branch_info.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/branch_name.png b/doc/gitlab_basics/basicsimages/branch_name.png deleted file mode 100644 index 06e77f5eea9..00000000000 Binary files a/doc/gitlab_basics/basicsimages/branch_name.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/branches.png b/doc/gitlab_basics/basicsimages/branches.png deleted file mode 100644 index c18fa83b968..00000000000 Binary files a/doc/gitlab_basics/basicsimages/branches.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/commit_changes.png b/doc/gitlab_basics/basicsimages/commit_changes.png deleted file mode 100644 index 81588336f37..00000000000 Binary files a/doc/gitlab_basics/basicsimages/commit_changes.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/commit_message.png b/doc/gitlab_basics/basicsimages/commit_message.png deleted file mode 100644 index 0df2c32653c..00000000000 Binary files a/doc/gitlab_basics/basicsimages/commit_message.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/commits.png b/doc/gitlab_basics/basicsimages/commits.png deleted file mode 100644 index 7e606539077..00000000000 Binary files a/doc/gitlab_basics/basicsimages/commits.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/compare_braches.png b/doc/gitlab_basics/basicsimages/compare_braches.png deleted file mode 100644 index 7eebaed9075..00000000000 Binary files a/doc/gitlab_basics/basicsimages/compare_braches.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/create_file.png b/doc/gitlab_basics/basicsimages/create_file.png deleted file mode 100644 index 688e355cca2..00000000000 Binary files a/doc/gitlab_basics/basicsimages/create_file.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/create_group.png b/doc/gitlab_basics/basicsimages/create_group.png deleted file mode 100644 index 57da898abdc..00000000000 Binary files a/doc/gitlab_basics/basicsimages/create_group.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/edit_file.png b/doc/gitlab_basics/basicsimages/edit_file.png deleted file mode 100644 index afa68760108..00000000000 Binary files a/doc/gitlab_basics/basicsimages/edit_file.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/file_located.png b/doc/gitlab_basics/basicsimages/file_located.png deleted file mode 100644 index 1def489d16b..00000000000 Binary files a/doc/gitlab_basics/basicsimages/file_located.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/file_name.png b/doc/gitlab_basics/basicsimages/file_name.png deleted file mode 100644 index 9ac2f1c355f..00000000000 Binary files a/doc/gitlab_basics/basicsimages/file_name.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/find_file.png b/doc/gitlab_basics/basicsimages/find_file.png deleted file mode 100644 index 98639149a39..00000000000 Binary files a/doc/gitlab_basics/basicsimages/find_file.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/find_group.png b/doc/gitlab_basics/basicsimages/find_group.png deleted file mode 100644 index 5ac33c7e953..00000000000 Binary files a/doc/gitlab_basics/basicsimages/find_group.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/fork.png b/doc/gitlab_basics/basicsimages/fork.png deleted file mode 100644 index b1f94938613..00000000000 Binary files a/doc/gitlab_basics/basicsimages/fork.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/group_info.png b/doc/gitlab_basics/basicsimages/group_info.png deleted file mode 100644 index e78d84e4d80..00000000000 Binary files a/doc/gitlab_basics/basicsimages/group_info.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/groups.png b/doc/gitlab_basics/basicsimages/groups.png deleted file mode 100644 index b8104343afa..00000000000 Binary files a/doc/gitlab_basics/basicsimages/groups.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/https.png b/doc/gitlab_basics/basicsimages/https.png deleted file mode 100644 index 2a31b4cf751..00000000000 Binary files a/doc/gitlab_basics/basicsimages/https.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/image_file.png b/doc/gitlab_basics/basicsimages/image_file.png deleted file mode 100644 index 1061d9c5082..00000000000 Binary files a/doc/gitlab_basics/basicsimages/image_file.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/issue_title.png b/doc/gitlab_basics/basicsimages/issue_title.png deleted file mode 100644 index 7b69c705392..00000000000 Binary files a/doc/gitlab_basics/basicsimages/issue_title.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/issues.png b/doc/gitlab_basics/basicsimages/issues.png deleted file mode 100644 index 9354d05319e..00000000000 Binary files a/doc/gitlab_basics/basicsimages/issues.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/key.png b/doc/gitlab_basics/basicsimages/key.png deleted file mode 100644 index 321805cda98..00000000000 Binary files a/doc/gitlab_basics/basicsimages/key.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/merge_requests.png b/doc/gitlab_basics/basicsimages/merge_requests.png deleted file mode 100644 index 7601d40de47..00000000000 Binary files a/doc/gitlab_basics/basicsimages/merge_requests.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/new_issue.png b/doc/gitlab_basics/basicsimages/new_issue.png deleted file mode 100644 index 94e7503dd8b..00000000000 Binary files a/doc/gitlab_basics/basicsimages/new_issue.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/new_merge_request.png b/doc/gitlab_basics/basicsimages/new_merge_request.png deleted file mode 100644 index 9120d2b1ab1..00000000000 Binary files a/doc/gitlab_basics/basicsimages/new_merge_request.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/new_project.png b/doc/gitlab_basics/basicsimages/new_project.png deleted file mode 100644 index ac255270a66..00000000000 Binary files a/doc/gitlab_basics/basicsimages/new_project.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/newbranch.png b/doc/gitlab_basics/basicsimages/newbranch.png deleted file mode 100644 index da1a6b604ea..00000000000 Binary files a/doc/gitlab_basics/basicsimages/newbranch.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/paste_sshkey.png b/doc/gitlab_basics/basicsimages/paste_sshkey.png deleted file mode 100644 index 9880ddfead1..00000000000 Binary files a/doc/gitlab_basics/basicsimages/paste_sshkey.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/profile_settings.png b/doc/gitlab_basics/basicsimages/profile_settings.png deleted file mode 100644 index 5f2e7a7e10c..00000000000 Binary files a/doc/gitlab_basics/basicsimages/profile_settings.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/project_info.png b/doc/gitlab_basics/basicsimages/project_info.png deleted file mode 100644 index 6c06ff351fa..00000000000 Binary files a/doc/gitlab_basics/basicsimages/project_info.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/public_file_link.png b/doc/gitlab_basics/basicsimages/public_file_link.png deleted file mode 100644 index 1a60a3d880a..00000000000 Binary files a/doc/gitlab_basics/basicsimages/public_file_link.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/select_branch.png b/doc/gitlab_basics/basicsimages/select_branch.png deleted file mode 100644 index 3475b2df576..00000000000 Binary files a/doc/gitlab_basics/basicsimages/select_branch.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/select_project.png b/doc/gitlab_basics/basicsimages/select_project.png deleted file mode 100644 index 6d5aa439124..00000000000 Binary files a/doc/gitlab_basics/basicsimages/select_project.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/settings.png b/doc/gitlab_basics/basicsimages/settings.png deleted file mode 100644 index 9bf9c5a0d39..00000000000 Binary files a/doc/gitlab_basics/basicsimages/settings.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/shh_keys.png b/doc/gitlab_basics/basicsimages/shh_keys.png deleted file mode 100644 index d7ef4dafe77..00000000000 Binary files a/doc/gitlab_basics/basicsimages/shh_keys.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/submit_new_issue.png b/doc/gitlab_basics/basicsimages/submit_new_issue.png deleted file mode 100644 index 18944417085..00000000000 Binary files a/doc/gitlab_basics/basicsimages/submit_new_issue.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/title_description_mr.png b/doc/gitlab_basics/basicsimages/title_description_mr.png deleted file mode 100644 index e08eb628414..00000000000 Binary files a/doc/gitlab_basics/basicsimages/title_description_mr.png and /dev/null differ diff --git a/doc/gitlab_basics/basicsimages/white_space.png b/doc/gitlab_basics/basicsimages/white_space.png deleted file mode 100644 index 6363a09360e..00000000000 Binary files a/doc/gitlab_basics/basicsimages/white_space.png and /dev/null differ diff --git a/doc/gitlab_basics/command_line_commands.md b/doc/gitlab_basics/command_line_commands.md deleted file mode 100644 index bad91795528..00000000000 --- a/doc/gitlab_basics/command_line_commands.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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 diff --git a/doc/gitlab_basics/create_your_ssh_keys.md b/doc/gitlab_basics/create_your_ssh_keys.md deleted file mode 100644 index 1e7f7c28513..00000000000 --- a/doc/gitlab_basics/create_your_ssh_keys.md +++ /dev/null @@ -1,37 +0,0 @@ -# How to create your SSH Keys - -You need to connect your computer to your GitLab account through SSH Keys. They are unique for every computer that you link your GitLab account with. - -## Generate your SSH Key - -* Create an account on GitLab. Sign up and check your email for your confirmation link - -* After you confirm, go to [gitlab.com](https://about.gitlab.com/) and sign in to your account - -## Add your SSH Key - -* At the top right corner, click on "profile settings" - -![profile settings](basicsimages/profile_settings.png) - -* On the left side menu click on "SSH Keys" - -![SSH Keys](basicsimages/shh_keys.png) - -* Then click on the green button "Add SSH Key" - -![Add SSH Key](basicsimages/add_sshkey.png) - -* There, you should paste the SSH Key that your commandline will generate for you. Below you'll find the steps to generate it - -![Paste SSH Key](basicsimages/paste_sshkey.png) - -## To generate an SSH Key on your commandline - -* Go to your [commandline](start_using_git.md) and follow the [instructions](https://gitlab.com/help/ssh/README) to generate it - -* Copy the SSH Key that your commandline created and paste it on the "Key" box on the GitLab page. The title will be added automatically - -![Paste SSH Key](basicsimages/key.png) - -* Now, you'll be able to use Git over SSH, instead of Git over HTTP. diff --git a/doc/gitlab_basics/start_using_git.md b/doc/gitlab_basics/start_using_git.md deleted file mode 100644 index f01a2f77eec..00000000000 --- a/doc/gitlab_basics/start_using_git.md +++ /dev/null @@ -1,67 +0,0 @@ -# Start using Git on the commandline - -If you want to start using a Git and GitLab, make sure that you have created an account on [gitlab.com](https://about.gitlab.com/) - -## Open a shell - -* Depending on your operating system, find the shell of your preference. Here are some suggestions - -- [Terminal](http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line) on Mac OSX - -- [GitBash](https://msysgit.github.io) on Windows - -- [Linux Terminal](http://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/) on Linux - -## Check if Git has already been installed - -* Git is usually preinstalled on Mac and Linux - -* Type the following command and then press enter - -``` -git --version -``` - -* You should receive a message that will tell you which Git version you have in your computer. If you don’t receive a "Git version" message, it means that you need to [download Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - -* If Git doesn't automatically download, there's an option on the website to [download manually](https://git-scm.com/downloads). Then follow the steps on the installation window - -* After you finished installing, open a new shell and type "git --version" again to verify that it was correctly installed - -## Add your Git username and set your email - -* It is important because every Git commit that you create will use this information - -* On your shell, type the following command to add your username - -``` -git config --global user.name ADD YOUR USERNAME -``` - -* Then verify that you have the correct username - -``` -git config --global user.name -``` - -* To set your email address, type the following command - -``` -git config --global user.email ADD YOUR EMAIL -``` - -* To verify that you entered your email correctly, type - -``` -git config --global user.email -``` - -* You'll need to do this only once because you are using the "--global" option. It tells Git to always use this information for anything you do on that system. If you want to override this with a different username or email address for specific projects, you can run the command without the "--global" option when you’re in that project - -## Check your information - -* To view the information that you entered, type - -``` -git config --global --list -``` -- 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/README.md | 8 ++++---- doc/gitlab-basics/command-line-commands.md | 2 +- doc/gitlab-basics/create-your-ssh-keys.md | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/gitlab-basics/README.md b/doc/gitlab-basics/README.md index a2edede5f1c..ffe1c358424 100644 --- a/doc/gitlab-basics/README.md +++ b/doc/gitlab-basics/README.md @@ -2,10 +2,10 @@ Step-by-step guides on the basics of working with Git and GitLab. -* [Start using Git on the commandline](start_using_git.md) +* [Start using Git on the commandline](start-using-git.md) -* [Create and add your SSH Keys](create_your_ssh_keys.md) +* [Create and add your SSH Keys](create-your-ssh-keys.md) -* [Command Line basic commands](command_line_commands.md) +* [Command Line basic commands](command-line-commands.md) -* [Basic Git commands](basic_git_commands.md) +* [Basic Git commands](basic-git-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) diff --git a/doc/gitlab-basics/create-your-ssh-keys.md b/doc/gitlab-basics/create-your-ssh-keys.md index 1e7f7c28513..2b6a1f2d808 100644 --- a/doc/gitlab-basics/create-your-ssh-keys.md +++ b/doc/gitlab-basics/create-your-ssh-keys.md @@ -28,7 +28,7 @@ You need to connect your computer to your GitLab account through SSH Keys. They ## To generate an SSH Key on your commandline -* Go to your [commandline](start_using_git.md) and follow the [instructions](https://gitlab.com/help/ssh/README) to generate it +* Go to your [commandline](start-using-git.md) and follow the [instructions](https://gitlab.com/help/ssh/README) to generate it * Copy the SSH Key that your commandline created and paste it on the "Key" box on the GitLab page. The title will be added automatically -- 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') 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/basic-git-commands.md | 52 --------------------------- doc/gitlab-basics/command-line-commands.md | 57 ++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 55 deletions(-) (limited to 'doc') diff --git a/doc/gitlab-basics/basic-git-commands.md b/doc/gitlab-basics/basic-git-commands.md index 895876c41d9..ed210ba5420 100644 --- a/doc/gitlab-basics/basic-git-commands.md +++ b/doc/gitlab-basics/basic-git-commands.md @@ -1,17 +1,5 @@ # Basic Git commands -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 -``` -cd ../ -``` - * Go to the master branch to pull the latest changes from there ``` git checkout master @@ -33,26 +21,6 @@ git checkout -b NAME-OF-BRANCH git checkout NAME-OF-BRANCH ``` -* 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 -``` - * To see the changes you've made (it's important to be aware of what's happening and what's the status of your changes) ``` git status @@ -69,16 +37,6 @@ git commit -m "DESCRIBE THE INTENTION OF THE COMMIT" git push origin NAME-OF-BRANCH ``` -* Remove a file -``` -rm NAME-OF-FILE -``` - -* Remove a directory and all of its contents -``` -rm -rf NAME-OF-DIRECTORY -``` - * Throw away all changes in the Git repository, but leave unstaged things ``` git checkout . @@ -89,11 +47,6 @@ git checkout . git clean -f ``` -* View history in terminal -``` -history -``` - * Remove all the changes that you don't want to send to gitlab.com ``` git add NAME-OF-FILE -all @@ -104,8 +57,3 @@ git add NAME-OF-FILE -all git checkout NAME-OF-BRANCH git merge master ``` - -* Carry out commands for which the account you are using lacks authority. (You will be asked for an administrator’s password) -``` -sudo -``` 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') 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