Import Github repo to Gitlab@PNNL
Clone repo from Github to local machine
- Go to the repository on Github and copy the
clone with HTTPSaddress
- On your local machine
git clone https://github.com/pnnl-sbrsfa/HFR-flow.git
- now the remote origin is pointing to
Create new repo on Gitlab
- Go to Gitlab-sbrsfa group, click
New projectand give a project name (let’s say
test), then click
- After the new project
testhas been created, you will see an option at the bottom of the page saying
Push an existing Git repository.
cd existing_repo git remote rename origin old-origin git remote add origin https://gitlab.pnnl.gov/sbrsfa/test.git git push -u origin --all git push -u origin --tags
- Follow the command line instructions and you are all set.
- Now the remote origin is pointing to
- To see all the remotes available
git remote -v
Options to push changes
You can push your commit to different origins.
git push origin master # push to Gitlab git push old-origin master # push to Github