Setting up a new repository – locally
Here is the standard way to start a new repository from an existing directory. The first part just tells creates some content. You really just need to start from the “git init” line and add all the files you want with “git add”.
mkdir api-test cd api-test git init touch README git add README git commit -m ‘first commit’
Pushing to a duke math gitlab repository
Assuming I have already set up a get lab repository called api-test the following command pushes the git repository I set up above to that repository. Of course you would replace “jonm” with your username. gitlab actually tells you what to so.
git remote add origin git@git.math.duke.edu:jonm/api-test.git git push -u origin master