Gitlab - Common command Snipet kode penting dalam gitlab Getting started with gitlab Inisiasi folder dalam gitlab: cd existing_repo git remote add origin https://gitlab.com/sandihex/sims-server.git git branch -M main git push -uf origin main To fetch and synchronize your local repository with the main branch from the remote repository on GitLab, follow these steps: Fetch the latest changes from the remote repository:   git fetch origin Reset your local main branch to match the remote main branch: git reset --hard origin/main This command will force your local  main branch to match the state of the main branch on the remote repository, discarding any local changes. Ensure you are on the main branch: git checkout main By following these steps, your local repository will be synchronized with the main branch on the remote GitLab repository. If you have any local changes you want to keep, make sure to commit or stash them before running these commands. Create repository from empty repository Git global setup git config --global user.name "Sandi Wibowo" git config --global user.email "sandihex@gmail.com" Create a new repository git clone https://gitlab.com/sandihex/api-sims.git cd api-sims git switch --create main touch README.md git add README.md git commit -m "add README" git push --set-upstream origin main