aboutsummaryrefslogtreecommitdiff
path: root/USE.md
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-05-26 17:08:47 +0200
committerJonas Smedegaard <dr@jones.dk>2024-05-26 17:08:47 +0200
commit12395e13642cf9514b4cebeab0e36f86ec40bcb3 (patch)
treefcde6e0c8746e2ac7bbf185da97a212be2d654a9 /USE.md
parentdb9f9b93a7eccfa0c50f74df218d1c47df040b14 (diff)
modernize markdown: use triple-backtick (not tab) for code block
Diffstat (limited to 'USE.md')
-rw-r--r--USE.md35
1 files changed, 23 insertions, 12 deletions
diff --git a/USE.md b/USE.md
index cfbf7e2..57f5787 100644
--- a/USE.md
+++ b/USE.md
@@ -30,8 +30,9 @@ To turn a folder into a git repository,
go into the folder,
and initialize its git database:
- git init
-
+```shell
+git init
+```
## Save
@@ -41,14 +42,18 @@ for git archival,
first mark which files are involved
and then archive their (changes to) content:
- git add foo bar
- git add baz
- git commit -m "Update foo bar, and add baz."
+```shell
+git add foo bar
+git add baz
+git commit -m "Update foo bar, and add baz."
+```
Alternatively you can update (but not add)
in one go:
- git commit -m "Update foo bar." foo bar
+```shell
+git commit -m "Update foo bar." foo bar
+```
## Share
@@ -56,14 +61,18 @@ in one go:
To collaborate on a shared git repository,
first create a local copy from the shared location:
- git clone git.example.org:/srv/git/source.example.org/example.git
+```shell
+git clone git.example.org:/srv/git/source.example.org/example.git
+```
Then from time to time syncronize,
first fetch eventual updates from others
and then push your local changes:
- git pull
- git push
+```shell
+git pull
+git push
+```
### Publish
@@ -72,9 +81,11 @@ first create a new empty git publicly,
then tell your local git where its new origin will be,
and finally push your local git into its new public location:
- ssh git.example.org git init --bare --shared /srv/git/source.example.org/example.git
- git remote add origin git.example.org:/srv/git/source.example.org/example.git
- git push --set-upstream origin master
+```shell
+ssh git.example.org git init --bare --shared /srv/git/source.example.org/example.git
+git remote add origin git.example.org:/srv/git/source.example.org/example.git
+git push --set-upstream origin master
+```
## See also