Gitting-Started/README.md

66 lines
1.2 KiB
Markdown
Raw Normal View History

2021-05-22 15:28:39 +00:00
# Gitting-Started
2021-05-22 11:36:42 -04:00
Getting started with Git
2021-05-22 11:59:58 -04:00
## I recommend WSL if using Windows. If using mac you already have terminal :-)
2021-05-22 11:43:00 -04:00
There are GUIs for Git, but I have no experience with them.
---
2021-05-22 11:45:15 -04:00
Installing WSL: [HERE](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
2021-05-22 11:43:00 -04:00
2021-05-22 11:59:58 -04:00
I recommend Debian OR Alpine
Alpine Linux: [HERE](https://www.microsoft.com/en-us/p/alpine-wsl/9p804crf0395)
Debian Linux: [HERE](https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6?activetab=pivot:overviewtab)
2021-05-22 11:43:00 -04:00
---
2021-05-22 11:36:42 -04:00
Create SSH Key
2021-05-22 12:00:29 -04:00
```ssh-keygen```
2021-05-22 11:36:42 -04:00
2021-05-22 11:43:00 -04:00
---
2021-05-22 11:36:42 -04:00
Get SSH public key
```cat ~/.ssh/id_rsa.pub```
2021-05-22 11:43:00 -04:00
---
2021-05-22 11:36:42 -04:00
Add key to gitea
2021-05-22 11:43:00 -04:00
1. User profile in upper right hand corner
2. Settings
3. SSH/GPG Keys
4. Manage SSH Keys -> Add Key (to the right)
5. Paste whole key in Content, this should add the SSH Key Name in the name field
---
2021-05-22 11:59:58 -04:00
Clone git repo
1. Find repo you want
2. Switch to SSH option in cloning
3. ```git clone URL_HERE```
---
2021-05-22 11:43:00 -04:00
Now you can do the git stuff
1. ```git add NEW_FILE```
2. ```git commit -m 'ADD INFO HERE OF WHAT WAS CHANGED/ADDED'```
3. ```git push```
2021-05-22 12:01:08 -04:00
## Your updates will now be pushed, if there's a pipline it might take a while 10/15mins for the updates to be shown