Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65fb188b27 | ||
|
|
5187fe6cba | ||
|
|
1edc606ae6 | ||
|
|
a405bc575e | ||
|
|
8b34c69b0e | ||
|
|
b494a870b3 | ||
|
|
e2f97cb1cd | ||
|
|
23b2481ac0 | ||
|
|
f3d148de5f | ||
|
|
9429b44156 | ||
|
|
d00391aa2f | ||
|
|
be09f5067e | ||
|
|
8c9a2734d0 | ||
|
|
89b9cb17b5 | ||
|
|
235ab03e34 | ||
|
|
37f199f681 | ||
|
|
89b7aaffe0 | ||
|
|
2ce0bb2e51 | ||
|
|
1196b30db0 | ||
|
|
8579740697 | ||
|
|
efbd3b8c3d |
@@ -1,8 +1,8 @@
|
||||
MIT License
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) 2020 iamdoubz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,30 +1,31 @@
|
||||
# LoramGit-HowTo
|
||||
# Gitea-HowTo
|
||||
|
||||
Brief description on how to use LoramGit
|
||||
Brief description on how to use Gitea
|
||||
|
||||
## Getting Started
|
||||
## Setting up SSH Access
|
||||
See the [doc how to set this up](docs/SSH.md).
|
||||
|
||||
There are several ways to start working on your code. The quickest and easiest way is to simply click on the file you want to update, then click the edit icon.
|
||||
## New File
|
||||
|
||||

|
||||
Please read the doc for creating a new file from the [web interface](docs/NEWFILE-web.md) or for creating a new file [from SSH](docs/NEWFILE-ssh.md).
|
||||
|
||||
Then, create a pull request once you are done editing the file and commit the changes.
|
||||
## Editing
|
||||
|
||||

|
||||
There are several ways to start editing your code. The quickest and easiest way is to use the [web interface](docs/EDITING-web.md).
|
||||
|
||||
The other way, for advanced users familiar with other Git platforms like [GitHub](https://github.com/), can use [Git for windows](https://git-scm.com/download/win).
|
||||
The second way, for advanced users familiar with other Git platforms like [GitHub](https://github.com/), can use [Git for windows](https://git-scm.com/download/win) and follow [these instructions](docs/EDITING-ssh.md).
|
||||
|
||||
Using this way, you can then make changes like this:
|
||||
## Adding a Repo
|
||||
|
||||
1. git clone https://mobile.loram.com/code/dwdoubet/LoramGit-HowTo.git
|
||||
2. git checkout -b dev master
|
||||
To Be Created...
|
||||
|
||||
Now make your changes to the file you need to change. I recommend using [Notepad++](https://notepad-plus-plus.org/downloads/).
|
||||
## Markdown
|
||||
|
||||
Once you have made your changes, you need to make a pull request and save your info back to the repository.
|
||||
How the heck do I make my pages look as fancy as yours? Well, Gitea uses something called Markdown, which is like css and html, but it isn't. Anyway, I really like [this resource](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet "Markdown Cheatsheet") and has helped me in the past (and now) with the nuances of it.
|
||||
|
||||
3. git add file_you_changed.txt
|
||||
4. git commit -m "Update this and that"
|
||||
5. git push origin dev
|
||||
### Additional Resources
|
||||
|
||||
This is a brief how to. For more details on how to use "Git", check out [this resource here](https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html).
|
||||
Here is some docs that might help in the future:
|
||||
* https://superuser.com/a/912281
|
||||
* https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
|
||||
* https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# Editing an existing file using ssh
|
||||
|
||||
If you have not already done so, you will need to download and install Git for Windows, generate a SSH key, and import your public key into gogs. If you have not done this, [head here first](docs/SSH.md).
|
||||
|
||||
### Steps
|
||||
|
||||
1. Get the SSH address of the repo you want to change (Figure 1): `git clone dwdoubet@git.dou.bet:iamdoubz/Gitea-HowTo.git`
|
||||
2. Switch branch to dev: `git switch dev`
|
||||
3. If for some reason there isn't a `dev` branch, create one from the `master` branch: `git checkout -b dev master`
|
||||
4. Now make your changes to the file you need to change. I recommend using [Notepad++](https://notepad-plus-plus.org/downloads/) or you may use `nano filename_youre_changing.txt`
|
||||
5. Once you have made your changes, you need to make a pull request and save your info back to the repository.
|
||||
6. To see what has changed: `git status`
|
||||
7. Usually, it will tell you what command to run next:
|
||||
|
||||
```
|
||||
user@comp MINGW64 ~/Downloads/Gitea-HowTo (master)
|
||||
$ git status
|
||||
On branch master
|
||||
Your branch is up to date with 'origin/master'.
|
||||
|
||||
Changes not staged for commit:
|
||||
(use "git add <file>..." to update what will be committed)
|
||||
(use "git restore <file>..." to discard changes in working directory)
|
||||
modified: filename_youre_changing.txt
|
||||
```
|
||||
8. If you are ready to commit changes: `git add filename_youre_changing.txt`
|
||||
9. If you want to discard changes: `git restore filename_youre_changing.txt`
|
||||
10. To save your changes and are ready to commit: `git commit -m "My comment on why I'm updating this file"`
|
||||
11. Now you need to send your changes to the server: `git push origin dev`
|
||||
12. "origin" means local computer and "dev" is the branch you are updating.
|
||||
13. You should be all set! Go back to the web interface and make a pull request from dev to master (Figure 2).
|
||||
|
||||

|
||||
|
||||
*Figure 1*
|
||||
|
||||

|
||||
|
||||
*Figure 2*
|
||||
@@ -0,0 +1,9 @@
|
||||
# Editing an existing file from web interface
|
||||
|
||||
Simply click on the file you want to update, then click the edit icon.
|
||||
|
||||

|
||||
|
||||
Then, create a pull request once you are done editing the file and commit the changes.
|
||||
|
||||

|
||||
@@ -0,0 +1,7 @@
|
||||
# Creating a new file in repo from SSH
|
||||
|
||||
1. Using [Notepad++](https://notepad-plus-plus.org/downloads/), your favorite editor, or simply `nano filename_youre_creating.txt` create your new file.
|
||||
2. Once you have created your file and content: `git add filename_youre_creating.txt`
|
||||
3. Commit your additions: `git commit -m "Why I'm adding a new file"`
|
||||
4. Save changes to `dev` branch on server: `git push origin dev`
|
||||
5. Or rather make changes directly to the `master` branch: `git push origin master`
|
||||
@@ -0,0 +1,3 @@
|
||||
# Creating a new file in repo from the web
|
||||
|
||||
This is self explanatory. I hope you can figure it out.
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# Setting up SSH
|
||||
|
||||
## Covered in this guide
|
||||
|
||||
1. Generating a new ssh key
|
||||
2. Adding key to be used
|
||||
3. Uploading public key into Gitea
|
||||
|
||||
## What you need to do everytime you boot
|
||||
If you have never done this before, skip this section and go to Steps below, else:
|
||||
|
||||
1. Start the agent: `eval $(ssh-agent -s)`
|
||||
2. Add the key: `ssh-add C:\Users\%username%\.ssh\id_rsa`
|
||||
|
||||
### Steps
|
||||
|
||||
1. Download and install [Git for Windows](https://git-scm.com/download/win)
|
||||
2. NOTE: if you already have this installed, make sure you don't have ssh-keys already generated by navigating to: `C:\Users\%username%\.ssh`
|
||||
3. Assuming this is your first time, generate a new key (please change %username% to your username! - you may also use your email address): `ssh-keygen -t rsa -b 4096 -C "%username%"`
|
||||
4. When it asks you where to save, just press enter. It will default to `C:\Users\%username%\.ssh`
|
||||
5. It will then ask for a passphrase. This isn't required, but you can add one if you so please; or, just press enter.
|
||||
6. Next, we need to add the new key to the Windows git agent, letting it know we can use this key.
|
||||
7. Start the agent: `eval $(ssh-agent -s)`
|
||||
8. Then add the key: `ssh-add C:\Users\%username%\.ssh\id_rsa`
|
||||
9. Now add your public key to Dou.Git
|
||||
10. Log in to [Gitea](https://git.dou.bet/user/login?redirect_to=) and in upper right hand corner click on arrow and select "Settings" (Figure 1).
|
||||
11. Then click on SSH/GPG Keys.
|
||||
12. Then click on "Add Key" (Figure 2).
|
||||
13. Name the key something like your username and paste the contents of `C:\Users\%username%\.ssh\id_rsa_pub` and then click "Add Key" (Figure 3).
|
||||
14. Congrats! You are now able to make changes, edits, and commits using SSH!
|
||||
|
||||
|
||||
|  |
|
||||
| :--------: |
|
||||
| **Figure 1** |
|
||||
|
||||
|  |
|
||||
| :--------: |
|
||||
| **Figure 2** |
|
||||
|
||||
|  |
|
||||
| :--------: |
|
||||
| **Figure 3** |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user