Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
cluster:usage_tips:git [2022/09/09 14:14] – created lukab | cluster:usage_tips:git [2022/10/25 11:15] (current) – [3. Step: Clone the new GitHub project to the cluster] matiasrus | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Test | + | ====== |
+ | |||
+ | 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: Connect Github Account ==== | ||
+ | |||
+ | **Connect your Github account to the cluster (more detailed info see: https:// | ||
+ | |||
+ | //(please skip if you have used GitHub on the cluster before)// | ||
+ | |||
+ | Create an SSH key on the cluster: | ||
+ | |||
+ | < | ||
+ | ssh-keygen -t ed25519 -C "< | ||
+ | </ | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |