diff options
author | Job van der Voort <job@gitlab.com> | 2015-07-01 08:28:08 +0000 |
---|---|---|
committer | Job van der Voort <job@gitlab.com> | 2015-07-01 08:28:08 +0000 |
commit | 36ecc6d30555fc3117373e25164bbdd3c33b37e8 (patch) | |
tree | 78eded279ffbd86bbabbdb79c1b1a35e54115edb | |
parent | e934a62aeb67bbca565a77f8c5d19ebf1272a1bd (diff) | |
parent | e0e89858550683f18ae1844c87d7b6fa938b75fe (diff) | |
download | gitlab-ce-36ecc6d30555fc3117373e25164bbdd3c33b37e8.tar.gz |
Merge branch 'commandline' into 'master'
added new doc "command line commands"
Added new doc to GitLab Basics
See merge request !1880
-rw-r--r-- | doc/gitlab-basics/README.md | 11 | ||||
-rw-r--r-- | doc/gitlab-basics/basic-git-commands.md | 59 | ||||
-rw-r--r-- | doc/gitlab-basics/basicsimages/add_new_merge_request.png (renamed from doc/gitlab_basics/basicsimages/add_new_merge_request.png) | bin | 9467 -> 9467 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/add_sshkey.png (renamed from doc/gitlab_basics/basicsimages/add_sshkey.png) | bin | 1463 -> 1463 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/branch_info.png (renamed from doc/gitlab_basics/basicsimages/branch_info.png) | bin | 7978 -> 7978 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/branch_name.png (renamed from doc/gitlab_basics/basicsimages/branch_name.png) | bin | 2199 -> 2199 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/branches.png (renamed from doc/gitlab_basics/basicsimages/branches.png) | bin | 3653 -> 3653 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/commit_changes.png (renamed from doc/gitlab_basics/basicsimages/commit_changes.png) | bin | 5567 -> 5567 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/commit_message.png (renamed from doc/gitlab_basics/basicsimages/commit_message.png) | bin | 5707 -> 5707 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/commits.png (renamed from doc/gitlab_basics/basicsimages/commits.png) | bin | 4258 -> 4258 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/compare_braches.png (renamed from doc/gitlab_basics/basicsimages/compare_braches.png) | bin | 1624 -> 1624 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/create_file.png (renamed from doc/gitlab_basics/basicsimages/create_file.png) | bin | 2524 -> 2524 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/create_group.png (renamed from doc/gitlab_basics/basicsimages/create_group.png) | bin | 3224 -> 3224 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/edit_file.png (renamed from doc/gitlab_basics/basicsimages/edit_file.png) | bin | 2259 -> 2259 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/file_located.png (renamed from doc/gitlab_basics/basicsimages/file_located.png) | bin | 3156 -> 3156 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/file_name.png (renamed from doc/gitlab_basics/basicsimages/file_name.png) | bin | 2544 -> 2544 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/find_file.png (renamed from doc/gitlab_basics/basicsimages/find_file.png) | bin | 8840 -> 8840 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/find_group.png (renamed from doc/gitlab_basics/basicsimages/find_group.png) | bin | 6159 -> 6159 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/fork.png (renamed from doc/gitlab_basics/basicsimages/fork.png) | bin | 1046 -> 1046 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/group_info.png (renamed from doc/gitlab_basics/basicsimages/group_info.png) | bin | 16217 -> 16217 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/groups.png (renamed from doc/gitlab_basics/basicsimages/groups.png) | bin | 4857 -> 4857 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/https.png (renamed from doc/gitlab_basics/basicsimages/https.png) | bin | 2887 -> 2887 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/image_file.png (renamed from doc/gitlab_basics/basicsimages/image_file.png) | bin | 2939 -> 2939 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/issue_title.png (renamed from doc/gitlab_basics/basicsimages/issue_title.png) | bin | 9059 -> 9059 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/issues.png (renamed from doc/gitlab_basics/basicsimages/issues.png) | bin | 4332 -> 4332 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/key.png (renamed from doc/gitlab_basics/basicsimages/key.png) | bin | 1264 -> 1264 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/merge_requests.png (renamed from doc/gitlab_basics/basicsimages/merge_requests.png) | bin | 4381 -> 4381 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/new_issue.png (renamed from doc/gitlab_basics/basicsimages/new_issue.png) | bin | 2974 -> 2974 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/new_merge_request.png (renamed from doc/gitlab_basics/basicsimages/new_merge_request.png) | bin | 3227 -> 3227 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/new_project.png (renamed from doc/gitlab_basics/basicsimages/new_project.png) | bin | 2319 -> 2319 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/newbranch.png (renamed from doc/gitlab_basics/basicsimages/newbranch.png) | bin | 1314 -> 1314 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/paste_sshkey.png (renamed from doc/gitlab_basics/basicsimages/paste_sshkey.png) | bin | 8620 -> 8620 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/profile_settings.png (renamed from doc/gitlab_basics/basicsimages/profile_settings.png) | bin | 1194 -> 1194 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/project_info.png (renamed from doc/gitlab_basics/basicsimages/project_info.png) | bin | 21862 -> 21862 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/public_file_link.png (renamed from doc/gitlab_basics/basicsimages/public_file_link.png) | bin | 3038 -> 3038 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/select_branch.png (renamed from doc/gitlab_basics/basicsimages/select_branch.png) | bin | 12213 -> 12213 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/select_project.png (renamed from doc/gitlab_basics/basicsimages/select_project.png) | bin | 16832 -> 16832 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/settings.png (renamed from doc/gitlab_basics/basicsimages/settings.png) | bin | 4321 -> 4321 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/shh_keys.png (renamed from doc/gitlab_basics/basicsimages/shh_keys.png) | bin | 4981 -> 4981 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/submit_new_issue.png (renamed from doc/gitlab_basics/basicsimages/submit_new_issue.png) | bin | 9083 -> 9083 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/title_description_mr.png (renamed from doc/gitlab_basics/basicsimages/title_description_mr.png) | bin | 12749 -> 12749 bytes | |||
-rw-r--r-- | doc/gitlab-basics/basicsimages/white_space.png (renamed from doc/gitlab_basics/basicsimages/white_space.png) | bin | 3707 -> 3707 bytes | |||
-rw-r--r-- | doc/gitlab-basics/command-line-commands.md | 72 | ||||
-rw-r--r-- | doc/gitlab-basics/create-your-ssh-keys.md (renamed from doc/gitlab_basics/create_your_ssh_keys.md) | 2 | ||||
-rw-r--r-- | doc/gitlab-basics/start-using-git.md (renamed from doc/gitlab_basics/start_using_git.md) | 6 | ||||
-rw-r--r-- | doc/gitlab_basics/README.md | 7 |
46 files changed, 146 insertions, 11 deletions
diff --git a/doc/gitlab-basics/README.md b/doc/gitlab-basics/README.md new file mode 100644 index 00000000000..ffe1c358424 --- /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..ed210ba5420 --- /dev/null +++ b/doc/gitlab-basics/basic-git-commands.md @@ -0,0 +1,59 @@ +# Basic Git commands + +* 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 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 +``` + +* 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 +``` + +* 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 +``` diff --git a/doc/gitlab_basics/basicsimages/add_new_merge_request.png b/doc/gitlab-basics/basicsimages/add_new_merge_request.png Binary files differindex 9d93b217a59..9d93b217a59 100644 --- a/doc/gitlab_basics/basicsimages/add_new_merge_request.png +++ b/doc/gitlab-basics/basicsimages/add_new_merge_request.png diff --git a/doc/gitlab_basics/basicsimages/add_sshkey.png b/doc/gitlab-basics/basicsimages/add_sshkey.png Binary files differindex 2dede97aa40..2dede97aa40 100644 --- a/doc/gitlab_basics/basicsimages/add_sshkey.png +++ b/doc/gitlab-basics/basicsimages/add_sshkey.png diff --git a/doc/gitlab_basics/basicsimages/branch_info.png b/doc/gitlab-basics/basicsimages/branch_info.png Binary files differindex c5e38b552a5..c5e38b552a5 100644 --- a/doc/gitlab_basics/basicsimages/branch_info.png +++ b/doc/gitlab-basics/basicsimages/branch_info.png diff --git a/doc/gitlab_basics/basicsimages/branch_name.png b/doc/gitlab-basics/basicsimages/branch_name.png Binary files differindex 06e77f5eea9..06e77f5eea9 100644 --- a/doc/gitlab_basics/basicsimages/branch_name.png +++ b/doc/gitlab-basics/basicsimages/branch_name.png diff --git a/doc/gitlab_basics/basicsimages/branches.png b/doc/gitlab-basics/basicsimages/branches.png Binary files differindex c18fa83b968..c18fa83b968 100644 --- a/doc/gitlab_basics/basicsimages/branches.png +++ b/doc/gitlab-basics/basicsimages/branches.png diff --git a/doc/gitlab_basics/basicsimages/commit_changes.png b/doc/gitlab-basics/basicsimages/commit_changes.png Binary files differindex 81588336f37..81588336f37 100644 --- a/doc/gitlab_basics/basicsimages/commit_changes.png +++ b/doc/gitlab-basics/basicsimages/commit_changes.png diff --git a/doc/gitlab_basics/basicsimages/commit_message.png b/doc/gitlab-basics/basicsimages/commit_message.png Binary files differindex 0df2c32653c..0df2c32653c 100644 --- a/doc/gitlab_basics/basicsimages/commit_message.png +++ b/doc/gitlab-basics/basicsimages/commit_message.png diff --git a/doc/gitlab_basics/basicsimages/commits.png b/doc/gitlab-basics/basicsimages/commits.png Binary files differindex 7e606539077..7e606539077 100644 --- a/doc/gitlab_basics/basicsimages/commits.png +++ b/doc/gitlab-basics/basicsimages/commits.png diff --git a/doc/gitlab_basics/basicsimages/compare_braches.png b/doc/gitlab-basics/basicsimages/compare_braches.png Binary files differindex 7eebaed9075..7eebaed9075 100644 --- a/doc/gitlab_basics/basicsimages/compare_braches.png +++ b/doc/gitlab-basics/basicsimages/compare_braches.png diff --git a/doc/gitlab_basics/basicsimages/create_file.png b/doc/gitlab-basics/basicsimages/create_file.png Binary files differindex 688e355cca2..688e355cca2 100644 --- a/doc/gitlab_basics/basicsimages/create_file.png +++ b/doc/gitlab-basics/basicsimages/create_file.png diff --git a/doc/gitlab_basics/basicsimages/create_group.png b/doc/gitlab-basics/basicsimages/create_group.png Binary files differindex 57da898abdc..57da898abdc 100644 --- a/doc/gitlab_basics/basicsimages/create_group.png +++ b/doc/gitlab-basics/basicsimages/create_group.png diff --git a/doc/gitlab_basics/basicsimages/edit_file.png b/doc/gitlab-basics/basicsimages/edit_file.png Binary files differindex afa68760108..afa68760108 100644 --- a/doc/gitlab_basics/basicsimages/edit_file.png +++ b/doc/gitlab-basics/basicsimages/edit_file.png diff --git a/doc/gitlab_basics/basicsimages/file_located.png b/doc/gitlab-basics/basicsimages/file_located.png Binary files differindex 1def489d16b..1def489d16b 100644 --- a/doc/gitlab_basics/basicsimages/file_located.png +++ b/doc/gitlab-basics/basicsimages/file_located.png diff --git a/doc/gitlab_basics/basicsimages/file_name.png b/doc/gitlab-basics/basicsimages/file_name.png Binary files differindex 9ac2f1c355f..9ac2f1c355f 100644 --- a/doc/gitlab_basics/basicsimages/file_name.png +++ b/doc/gitlab-basics/basicsimages/file_name.png diff --git a/doc/gitlab_basics/basicsimages/find_file.png b/doc/gitlab-basics/basicsimages/find_file.png Binary files differindex 98639149a39..98639149a39 100644 --- a/doc/gitlab_basics/basicsimages/find_file.png +++ b/doc/gitlab-basics/basicsimages/find_file.png diff --git a/doc/gitlab_basics/basicsimages/find_group.png b/doc/gitlab-basics/basicsimages/find_group.png Binary files differindex 5ac33c7e953..5ac33c7e953 100644 --- a/doc/gitlab_basics/basicsimages/find_group.png +++ b/doc/gitlab-basics/basicsimages/find_group.png diff --git a/doc/gitlab_basics/basicsimages/fork.png b/doc/gitlab-basics/basicsimages/fork.png Binary files differindex b1f94938613..b1f94938613 100644 --- a/doc/gitlab_basics/basicsimages/fork.png +++ b/doc/gitlab-basics/basicsimages/fork.png diff --git a/doc/gitlab_basics/basicsimages/group_info.png b/doc/gitlab-basics/basicsimages/group_info.png Binary files differindex e78d84e4d80..e78d84e4d80 100644 --- a/doc/gitlab_basics/basicsimages/group_info.png +++ b/doc/gitlab-basics/basicsimages/group_info.png diff --git a/doc/gitlab_basics/basicsimages/groups.png b/doc/gitlab-basics/basicsimages/groups.png Binary files differindex b8104343afa..b8104343afa 100644 --- a/doc/gitlab_basics/basicsimages/groups.png +++ b/doc/gitlab-basics/basicsimages/groups.png diff --git a/doc/gitlab_basics/basicsimages/https.png b/doc/gitlab-basics/basicsimages/https.png Binary files differindex 2a31b4cf751..2a31b4cf751 100644 --- a/doc/gitlab_basics/basicsimages/https.png +++ b/doc/gitlab-basics/basicsimages/https.png diff --git a/doc/gitlab_basics/basicsimages/image_file.png b/doc/gitlab-basics/basicsimages/image_file.png Binary files differindex 1061d9c5082..1061d9c5082 100644 --- a/doc/gitlab_basics/basicsimages/image_file.png +++ b/doc/gitlab-basics/basicsimages/image_file.png diff --git a/doc/gitlab_basics/basicsimages/issue_title.png b/doc/gitlab-basics/basicsimages/issue_title.png Binary files differindex 7b69c705392..7b69c705392 100644 --- a/doc/gitlab_basics/basicsimages/issue_title.png +++ b/doc/gitlab-basics/basicsimages/issue_title.png diff --git a/doc/gitlab_basics/basicsimages/issues.png b/doc/gitlab-basics/basicsimages/issues.png Binary files differindex 9354d05319e..9354d05319e 100644 --- a/doc/gitlab_basics/basicsimages/issues.png +++ b/doc/gitlab-basics/basicsimages/issues.png diff --git a/doc/gitlab_basics/basicsimages/key.png b/doc/gitlab-basics/basicsimages/key.png Binary files differindex 321805cda98..321805cda98 100644 --- a/doc/gitlab_basics/basicsimages/key.png +++ b/doc/gitlab-basics/basicsimages/key.png diff --git a/doc/gitlab_basics/basicsimages/merge_requests.png b/doc/gitlab-basics/basicsimages/merge_requests.png Binary files differindex 7601d40de47..7601d40de47 100644 --- a/doc/gitlab_basics/basicsimages/merge_requests.png +++ b/doc/gitlab-basics/basicsimages/merge_requests.png diff --git a/doc/gitlab_basics/basicsimages/new_issue.png b/doc/gitlab-basics/basicsimages/new_issue.png Binary files differindex 94e7503dd8b..94e7503dd8b 100644 --- a/doc/gitlab_basics/basicsimages/new_issue.png +++ b/doc/gitlab-basics/basicsimages/new_issue.png diff --git a/doc/gitlab_basics/basicsimages/new_merge_request.png b/doc/gitlab-basics/basicsimages/new_merge_request.png Binary files differindex 9120d2b1ab1..9120d2b1ab1 100644 --- a/doc/gitlab_basics/basicsimages/new_merge_request.png +++ b/doc/gitlab-basics/basicsimages/new_merge_request.png diff --git a/doc/gitlab_basics/basicsimages/new_project.png b/doc/gitlab-basics/basicsimages/new_project.png Binary files differindex ac255270a66..ac255270a66 100644 --- a/doc/gitlab_basics/basicsimages/new_project.png +++ b/doc/gitlab-basics/basicsimages/new_project.png diff --git a/doc/gitlab_basics/basicsimages/newbranch.png b/doc/gitlab-basics/basicsimages/newbranch.png Binary files differindex da1a6b604ea..da1a6b604ea 100644 --- a/doc/gitlab_basics/basicsimages/newbranch.png +++ b/doc/gitlab-basics/basicsimages/newbranch.png diff --git a/doc/gitlab_basics/basicsimages/paste_sshkey.png b/doc/gitlab-basics/basicsimages/paste_sshkey.png Binary files differindex 9880ddfead1..9880ddfead1 100644 --- a/doc/gitlab_basics/basicsimages/paste_sshkey.png +++ b/doc/gitlab-basics/basicsimages/paste_sshkey.png diff --git a/doc/gitlab_basics/basicsimages/profile_settings.png b/doc/gitlab-basics/basicsimages/profile_settings.png Binary files differindex 5f2e7a7e10c..5f2e7a7e10c 100644 --- a/doc/gitlab_basics/basicsimages/profile_settings.png +++ b/doc/gitlab-basics/basicsimages/profile_settings.png diff --git a/doc/gitlab_basics/basicsimages/project_info.png b/doc/gitlab-basics/basicsimages/project_info.png Binary files differindex 6c06ff351fa..6c06ff351fa 100644 --- a/doc/gitlab_basics/basicsimages/project_info.png +++ b/doc/gitlab-basics/basicsimages/project_info.png diff --git a/doc/gitlab_basics/basicsimages/public_file_link.png b/doc/gitlab-basics/basicsimages/public_file_link.png Binary files differindex 1a60a3d880a..1a60a3d880a 100644 --- a/doc/gitlab_basics/basicsimages/public_file_link.png +++ b/doc/gitlab-basics/basicsimages/public_file_link.png diff --git a/doc/gitlab_basics/basicsimages/select_branch.png b/doc/gitlab-basics/basicsimages/select_branch.png Binary files differindex 3475b2df576..3475b2df576 100644 --- a/doc/gitlab_basics/basicsimages/select_branch.png +++ b/doc/gitlab-basics/basicsimages/select_branch.png diff --git a/doc/gitlab_basics/basicsimages/select_project.png b/doc/gitlab-basics/basicsimages/select_project.png Binary files differindex 6d5aa439124..6d5aa439124 100644 --- a/doc/gitlab_basics/basicsimages/select_project.png +++ b/doc/gitlab-basics/basicsimages/select_project.png diff --git a/doc/gitlab_basics/basicsimages/settings.png b/doc/gitlab-basics/basicsimages/settings.png Binary files differindex 9bf9c5a0d39..9bf9c5a0d39 100644 --- a/doc/gitlab_basics/basicsimages/settings.png +++ b/doc/gitlab-basics/basicsimages/settings.png diff --git a/doc/gitlab_basics/basicsimages/shh_keys.png b/doc/gitlab-basics/basicsimages/shh_keys.png Binary files differindex d7ef4dafe77..d7ef4dafe77 100644 --- a/doc/gitlab_basics/basicsimages/shh_keys.png +++ b/doc/gitlab-basics/basicsimages/shh_keys.png diff --git a/doc/gitlab_basics/basicsimages/submit_new_issue.png b/doc/gitlab-basics/basicsimages/submit_new_issue.png Binary files differindex 18944417085..18944417085 100644 --- a/doc/gitlab_basics/basicsimages/submit_new_issue.png +++ b/doc/gitlab-basics/basicsimages/submit_new_issue.png diff --git a/doc/gitlab_basics/basicsimages/title_description_mr.png b/doc/gitlab-basics/basicsimages/title_description_mr.png Binary files differindex e08eb628414..e08eb628414 100644 --- a/doc/gitlab_basics/basicsimages/title_description_mr.png +++ b/doc/gitlab-basics/basicsimages/title_description_mr.png diff --git a/doc/gitlab_basics/basicsimages/white_space.png b/doc/gitlab-basics/basicsimages/white_space.png Binary files differindex 6363a09360e..6363a09360e 100644 --- a/doc/gitlab_basics/basicsimages/white_space.png +++ b/doc/gitlab-basics/basicsimages/white_space.png diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md new file mode 100644 index 00000000000..a15e275f27a --- /dev/null +++ b/doc/gitlab-basics/command-line-commands.md @@ -0,0 +1,72 @@ +# 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 [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) + +## 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 + +* Go into a project, directory or file to work in it +``` +cd NAME-OF-PROJECT-OR-FILE +``` + +* Go back one directory or file +``` +cd ../ +``` + +* 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 +``` 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 diff --git a/doc/gitlab_basics/start_using_git.md b/doc/gitlab-basics/start-using-git.md index f01a2f77eec..99103469ccc 100644 --- a/doc/gitlab_basics/start_using_git.md +++ b/doc/gitlab-basics/start-using-git.md @@ -40,7 +40,7 @@ git config --global user.name ADD YOUR USERNAME * Then verify that you have the correct username -``` +``` git config --global user.name ``` @@ -52,7 +52,7 @@ git config --global user.email ADD YOUR EMAIL * To verify that you entered your email correctly, type -``` +``` git config --global user.email ``` @@ -62,6 +62,6 @@ git config --global user.email * 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 de56c3ab4fc..00000000000 --- a/doc/gitlab_basics/README.md +++ /dev/null @@ -1,7 +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) |