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 +++++++++++++ 45 files changed, 249 insertions(+) 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 (limited to 'doc/gitlab-basics') 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 +``` -- cgit v1.2.1