Array
University of Oregon

Push a Repo to Gitlab

Here are the steps to push one of your repos to Gitlab. The following example assumes you will be pushing your Project 3 repo, but the steps are the same for any repo.

  1. Sign in to Github.
  2. Sign in to Gitlab using your Github account.
  3. Create a new project (i.e., repo):
    • Click Create a Project or New Project
    • Name: 281-p3
    • Visibility Level: Private
    • Do not initialize with a README (you will be pushing your p3 repo to Gitlab)
  4. You won’t be able to pull or push project code via HTTPS until you set a password on your account: Choose Password in left navigation
  5. Click, Copy URL to clipboard
  6. Start your shell, and cd to 281/projects/p3-userName/
  7. Add a new remote named, gitlab

    git remote add gitlab https://gitlab.com/userName/281-p3.git
    git remote -v

  8. Push master branch to Gitlab; reload remote repo to verify
  9. Push all other branches to Gitlab

That’s it. Repeat for repos, p1, p2, and p4.

Skip to toolbar