Documentation/README.md
buhtz 701da37d30 Clone & Commit via HTTP
Simple example about how to clone and commit/push via HTTP with Username and Password.
2019-06-04 23:44:55 +02:00

1.3 KiB

Clone & commit via HTTP (username & password)

The user in this examples is JohnDoe and it's repository is foobar. The repository was created via the Codeberg.org website including a README.md file.

~$ git clone https://codeberg.org/JohnDoe/foobar.git
Cloning into 'foobar'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.

Modify an existing file

~$ cd foobar
~/foobar$ vim README.md

Commit changes to local repository.

~/foobar$ git commit -am 'test'
[master 10074d7] test
 1 file changed, 2 insertions(+), 1 deletion(-)

Synchronize ("push") the modifications from the local repository to the remote one on Codeberg.

~/foobar$ git push https://codeberg.org/JohnDoe/foobar.git
Username for 'https://codeberg.org': JohnDoe
Password for 'https://JohnDoe@codeberg.org': 
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 266 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To https://codeberg.org/JohnDoe/foobar.git
   662e04e..10074d7  master -> master