Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.28 KB

3-git-remote.md

File metadata and controls

46 lines (33 loc) · 1.28 KB

Work with the remote repository (GitLab)

1. Setup SSH

2. Clone a repository

GitLab docs: Clone a repository

  1. Open a terminal and go to the directory where you want to clone the files.
  2. Copy this repo Git SSH url (REPO_URL) and clone the repo
git clone REPO-URL
  • Note:
    • Git automatically creates a folder with the repository name and downloads the files there.

3. Update and push to remote

# Go to the new directory:
cd project-1-git

# Create `dev` branch and checkout to it
git checkout -b dev

# Create a config file 
touch config.yaml 
echo "repo: project-1-git" >> config.yaml
cat config.yaml  

# Commit changes
git add config.yaml && git commit -m "Add config.yaml"

# Push to GitLab 
git push origin dev

4. Create a Merge Request

  • Create a Merge Request (via GitLab UI) to the main branch
  • Wait...
  • Check the test assignment report