... | ... | @@ -32,6 +32,8 @@ If you saved the key in a different directory, change `~` accordingly. If you ch |
|
|
and end with your email address. Copy all of it and enter it in the appropriate text box on: https://gitlab.com/profile/keys
|
|
|
Choose a name for the key and save it.
|
|
|
|
|
|
Create an empty git repository with `git init`.
|
|
|
|
|
|
Now go to: https://gitlab.com/rootmodels/OpenSimRoot and copy the SSH address to your clipboard. In your terminal, go to the directory you want to create your local copy of OpenSimRoot in and enter:
|
|
|
`git clone THE SSH ADDRESS YOU COPIED` At the time of writing the command is: `git clone git@gitlab.com:rootmodels/OpenSimRoot.git`
|
|
|
|
... | ... | @@ -44,7 +46,47 @@ Receiving objects: 100% (1345/1345), 2.00 MiB | 2.54 MiB/s, done. |
|
|
Resolving deltas: 100% (863/863), done.
|
|
|
Checking out files: 100% (310/310), done.
|
|
|
```
|
|
|
Now there should be a new directory called OpenSimRoot with all the files in it. We will build SimRoot with gcc, which is a compiler. To see if gcc is installed, enter the commands stated below and see if the output is similar.
|
|
|
Now there should be a new directory called OpenSimRoot with all the files in it. Now we will set up our remote repository. We do this by changing directory to the OpenSimRoot directory we just created and entering the command
|
|
|
`git remote add origin git@gitlab.com:rootmodels/OpenSimRoot.git`
|
|
|
|
|
|
This tells git to add a remote, with the name "origin" and with as source the SSH address of the OpenSimRoot repository. Now whenever we want to get the latest version we make sure we are in the OpenSimRoot directory and enter
|
|
|
`git fetch origin`
|
|
|
or
|
|
|
`git pull origin`
|
|
|
|
|
|
For more on remotes, see https://help.github.com/categories/managing-remotes/. For the difference between fetch and pull see http://stackoverflow.com/questions/292357/what-are-the-differences-between-git-pull-and-git-fetch
|
|
|
|
|
|
```
|
|
|
[pmxeds@kazbek OpenSimRoot]$ git remote add origin git@gitlab.com:rootmodels/OpenSimRoot.git
|
|
|
[pmxeds@kazbek OpenSimRoot]$ git fetch origin
|
|
|
remote: Counting objects: 3, done.
|
|
|
remote: Compressing objects: 100% (3/3), done.
|
|
|
remote: Total 3 (delta 2), reused 0 (delta 0)
|
|
|
Unpacking objects: 100% (3/3), done.
|
|
|
From gitlab.com:rootmodels/OpenSimRoot
|
|
|
* [new branch] master -> origin/master
|
|
|
* [new branch] osx-redirect -> origin/osx-redirect
|
|
|
```
|
|
|
|
|
|
When you tell git to pull you might get the following error message:
|
|
|
|
|
|
```
|
|
|
[pmxeds@kazbek OpenSimRoot]$ git pull origin
|
|
|
You asked to pull from the remote 'origin', but did not specify
|
|
|
a branch. Because this is not the default configured remote
|
|
|
for your current branch, you must specify a branch on the command line.
|
|
|
```
|
|
|
|
|
|
This means you have not specified a default branch for your current branch (the default branch is master). You can do this by entering `git branch --set-upstream-to origin/master`. This will set the master branch of the remote repository (assuming you called it origin) as the default branch for your current branch (which should be your master branch). Now you can use `git push` and `git pull` without specifying the branch. To see what has been changed, use `git diff master@{1} master` (you can enter higher values instead of 1 to look farther back). Now you should get:
|
|
|
|
|
|
```
|
|
|
[pmxeds@kazbek OpenSimRoot]$ git pull origin
|
|
|
Already up-to-date.
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
We will build SimRoot with gcc, which is a compiler. To see if gcc is installed, enter the commands stated below and see if the output is similar.
|
|
|
```
|
|
|
[pmxeds@kazbek ~]$ whereis gcc
|
|
|
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
|
... | ... | |