You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

268 lines
3.7 KiB

= Usage SwarmLab gitea!
Apostolos rootApostolos@swarmlab.io
// Metadata:
:description: IoT Εισαγωγή στο SwarmLab
:keywords: iot, swarm
:data-uri:
:toc: right
:toc-title: Πίνακας περιεχομένων
:toclevels: 4
:source-highlighter: highlight
:icons: font
:sectnums:
include::header.adoc[]
{empty} +
This HowTo teaches you how to Use SwarmLab gitea.
https://git-scm.com/[Git] is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
[[cheat-CreateRepository]]
== create a new repository
Open https://git.swarmlab.io:3000[Swarmlab Gitea]
Use any web browser on your computer to join
=== Sign In
.Click on "Sign-in"
image::./Gitea-sign-in-1.png[SwarmLab Sign-in]
[NOTE]
====
.Proxy Error
[source,bash]
----
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /user/login.
Reason: Error reading from remote server
Apache/2.4.25 (Debian) Server at git.swarmlab.io Port 3000
----
Reload Page!!!
====
=== New Repository
==== step 1
.New Repository
image::./repo-1.png[SwarmLab New Repository ]
==== step 2
.Create New Repository
image::./repo-2.png[SwarmLab New Repository ]
[[cheat-VloneRepository]]
== clone repository
=== git clone
==== copy url
.clone Repositor
image::./repo-clone-1.png[SwarmLab git clone ]
==== paste url
- On your computer!
.git clone
[source,bash]
----
git clone paste-url-here
----
.Install Git
[source.bash]
----
sudo apt update
sudo apt install git
----
.git error
[NOTE]
====
The requested URL returned error: 502
Try again!!!
====
== workflow
=== add & commit
You can propose changes (add it to the Index) using
.git add
[source,bash]
----
git add <filename>
git add *
----
This is the first step in the basic git workflow. To actually commit these changes use
.git status
[NOTE]
====
git status
====
.git commit
[source,bash]
----
git commit -a -m "Commit message"
----
[NOTE]
====
Now the file is committed to the HEAD, but not in your remote repository yet.
====
=== pushing changes
Your changes are now in the HEAD of your local working copy.
To send those changes to your remote repository, execute
.git push
[source,bash]
----
git push origin master
----
Change master to whatever branch you want to push your changes to.
=== update
to update your local repository to the newest commit, execute
.git pull
[source,bash]
----
git pull origin
----
in your working directory to fetch and merge remote changes.
=== log
in its simplest form, you can study repository history using..
.git log
[source,bash]
----
git log
----
You can add a lot of parameters to make the log look like what you want.
To see only the commits of a certain author:
.git log
[source,bash]
----
git log --author=bob
----
To see a very compressed log where each commit is one line:
.git log
[source,bash]
----
git log --pretty=oneline
----
Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches:
.git log
[source,bash]
----
git log --graph --oneline --decorate --all
----
See only which files have changed:
.git log
[source,bash]
----
git log --name-status
----
These are just a few of the possible parameters you can use. For more, see git log --help
== links & resources
https://book.git-scm.com/doc[Git Community Book]
http://marklodato.github.io/visual-git-guide/index-en.html[A Visual Git Reference]
:hardbreaks:
{empty} +
{empty} +
{empty}
:!hardbreaks:
'''
.Reminder
[NOTE]
====
:hardbreaks:
Caminante, no hay camino,
se hace camino al andar.
Wanderer, there is no path,
the path is made by walking.
*Antonio Machado* Campos de Castilla
====