Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| cluster:usage_tips:git [2022/09/09 14:23] – lukab | cluster:usage_tips:git [2022/10/25 11:15] (current) – [3. Step: Clone the new GitHub project to the cluster] matiasrus | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| How-to-Guide for connecting your GitHub account to the cluster, creating a new repository, cloning it to the cluster and collaborating on the cluster. | How-to-Guide for connecting your GitHub account to the cluster, creating a new repository, cloning it to the cluster and collaborating on the cluster. | ||
| - | ==== 1. Step ==== | + | ==== 1. Step: Connect |
| - | + | ||
| - | Set up a new Github | + | |
| - | + | ||
| - | + | ||
| - | ==== 2. Step ==== | + | |
| **Connect your Github account to the cluster (more detailed info see: https:// | **Connect your Github account to the cluster (more detailed info see: https:// | ||
| Line 14: | Line 9: | ||
| //(please skip if you have used GitHub on the cluster before)// | //(please skip if you have used GitHub on the cluster before)// | ||
| - | - Create an SSH key on the cluster | + | Create an SSH key on the cluster: |
| < | < | ||
| Line 20: | Line 15: | ||
| </ | </ | ||
| - | - Navigate to the folder where it was placed (usually in “/ | + | Navigate to the folder where it was placed (usually in “/ |
| + | |||
| + | Place the public key on your GitHub account in the browser under //your user > settings > SSH and GPC keys// | ||
| + | |||
| + | ==== 2. Step: Create Repository ==== | ||
| + | |||
| + | Set up a new GitHub repository on through the Github website (https:// | ||
| + | |||
| + | |||
| + | ==== 3. Step: Clone the new GitHub project to the cluster ==== | ||
| + | |||
| + | You can find this shareable link on the start page of the repository using GitHub in the browser. If you are using a private repository, you additionally need to give your fellow users access rights. For this navigate to //settings > collaborators > add people// and add them through their GitHub user names. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | < | ||
| + | git clone git@github.com: | ||
| + | </ | ||
| + | |||
| + | ==== 4. Step: Collaborate! ==== | ||
| + | |||
| + | Before you work on the project: | ||
| + | < | ||
| + | |||
| + | After you created new code files / plots / results: | ||
| + | < | ||
| + | |||
| + | Then save your current state: | ||
| + | |||
| + | < | ||
| + | |||
| + | Then push your state to the shared repository: | ||
| + | |||
| + | < | ||
| + | |||
| + | If you need further introduction on Git practices see https:// | ||
| + | |||
| + | |||
| - | - Place the public key on your GitHub account in the browser under your user > settings > SSH and GPC keys | ||