Git rutinary steps - TradingLab/tlrec GitHub Wiki
Call git commands from system prompt $ in the dev directory, e.g.
$ cd ~/TradingLab/MyProject
$ git -h
Set up git environment
Go to the development directory to start git operation and press:
$ git init
For creating a clone from an external repository, you have this command:
$ git clone https://github.com/TradingLab/AProject.git
It is recommended the use of ssh, for this, we generate a public key in your local system:
First set up the email and user name:
$ git config --global user.email "[email protected]"
$ git config --global user.name "myname"
$ ssh-keygen
$ cat ~/.ssh/id_rsa.pub
Open the file and copy the public key and create a SSH conection in Github, paste the public key.
$ cd ~/TradingLab/MyProject
Test the connection, try to SSH into GitHub.
$ ssh -T [email protected]
Generate in local server the recommended readme file:
$ touch README.md
Before any push operation it is required this command to refresh from external repository:
$ git pull MyProject master
Development steps
Here we have a void file README.md, check version status:
$ git status
It will appear this file with status in red, add things to be pushed to the project repository in GitHub:
$ git add .
or
$ git add --all
Viewing the "git status" command now appear in green, make a commit for the first project version
$ git commit -m "Commit test"
Now upload the first version to GitHub repository:
$ git push MyProject master
For that command, enter the corresponding password submitted previously to the GitHub with the public ssh key.
The repository is now updated.