# GitLab



#### Command line instructions <a href="#repo-command-line-instructions" id="repo-command-line-instructions"></a>

You can also upload existing files from your computer using the instructions below.

**Git global setup**

```bash
git config --global user.name "yosarawut"
git config --global user.email "yo_sarawut@hotmail.com"
```

**Create a new repository**

```bash
git clone git@gitlab.com:support-ecs/content.git
cd content
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
```

**Push an existing folder**

```bash
cd existing_folder
git init
git remote add origin git@gitlab.com:support-ecs/content.git
git add .
git commit -m "Initial commit"
git push -u origin master
```

**Push an existing Git repository**

```bash
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.com:support-ecs/content.git
git push -u origin --all
git push -u origin --tags
```

```bash
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCvMEru75x1sQk07Xa5bbQUrGrXjEfkTWXisMRNv4RrB9mEvlvcq0dDKyBmRCQLw/Huj0cVQCOyLCkYYhgtiETcW64UXM3ZhDVpXDH0B8l7u2klU1xUm23uFN8bg+CVaSB9J5KaOld0X0D+/EmeuTnRXedxLnETDZXIsvScZCCCaBDcSaVHyhvcgSpNMFWQNCx/aKgqcg7SAME4isgkXy+VmOF+zAzg/0fQwZww5lM12wKhpTvEmNZ23qLbWXzQCiumoBtyIStezvsO7yDgVyZXdOalVCgKkT1n/6PtzTO5+bjXksO5uVJQR07HvfbK6/P/PSkeik7j6WYqu64aPO0J7Cles1pgaHCAjZe+FYpIJfynAYBAQdYB3owG+aD/iT9Ec/q8keV2QCAYsbbAJp7/ozAoEATLok9BF5Ua+y0ErkNzFdT0db9D2Mknwqm8K8gqYtMKHapKxRCvAWnVvNecWFEwRVjtQru2iSsdJGm7dVwukCRIs2xO1KqCLpNtSVgQ9DUcqcolIDj+K0gLMl6oUPdirT1x4QJUDO8kZH17+B4a5TvIO+HgtT/2mvDh580CdcIxBw2ClLB1lir32L5SZBrmJDwPPboptjUfvpZTKr5RfwEzT321HDn6wskF4BOl1zWKDJ7YbYjw+jlYb277lSDe3yJl/tm2TqlzMHCDXw== yo_sarawut@hotmail.com

```

* [**สรุปวิธี สร้างและเพิ่ม SSH key ไปใส่ใน git hosting Github, Gitlab, Bitbucket**](https://siritas.gitlab.io/posts/common-instruction-to-put-ssh-key-to-favorite-git-hosting/)
* [**https://medium.com**](https://medium.com/@suraneti.rod/ssh-key-%E0%B8%A7%E0%B8%B4%E0%B8%98%E0%B8%B5%E0%B9%80%E0%B8%8B%E0%B9%87%E0%B8%97-multiple-key-%E0%B8%9A%E0%B8%99-mac-linux-%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%A3%E0%B8%93%E0%B8%B5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%A1%E0%B8%B5%E0%B8%AB%E0%B8%A5%E0%B8%B2%E0%B8%A2-account-bitbucket-github-gitlab-5cb3fedff8a6)
* [**https://devahoy.com/blog/2019/12/setup-multiple-git-accounts-with-ssh/**](https://devahoy.com/blog/2019/12/setup-multiple-git-accounts-with-ssh/)
* [**https://buggy.birdbyrd.com**](https://buggy.birdbyrd.com/sraang-config-aiflsamhrabkhwbkhumkaaraich-ssh-key-hlaaykhiiy-anainekhruue-ngediiywkan/)
