Skip to content

Instantly share code, notes, and snippets.

@uzl
Last active April 26, 2019 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uzl/4a4223b51c2e9bbd36120dec3311223d to your computer and use it in GitHub Desktop.
Save uzl/4a4223b51c2e9bbd36120dec3311223d to your computer and use it in GitHub Desktop.
Useful git CLI

Upload a new local repository to gitlab

This will create a new project on Gitlab without creating it manually on the server

git push --set-upstream address/your-project.git

Changing/Switching remote URLs

# view current remote URL
git remote -v

# change
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

# Verify new remote URL
git remote -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment