Git-related parts of the web interface #78

Merged
n merged 5 commits from ivan-paleo/Documentation:clone-commit-http into master 2 years ago

Added details on how to use the web interface for clone, edit, commit, push and pull (with screenshots).

Added details on how to use the web interface for clone, edit, commit, push and pull (with screenshots).

Thank you for your PR, Ivan! :)

I suggest to move the explanations of the web interface into its own article, maybe called "Clone & Commit via Web" to keep the individual articles more focused and also because I'm afraid, people wouldn't necessarily look for an explanation of the web UI in an article that's more about Git-over-HTTPS

Thank you for your PR, Ivan! :) I suggest to move the explanations of the web interface into its own article, maybe called "Clone & Commit via Web" to keep the individual articles more focused and also because I'm afraid, people wouldn't necessarily look for an explanation of the web UI in an article that's more about Git-over-HTTPS
lhinderberger added the
Kind: Documentation
Status: Needs feedback
labels 2 years ago
Poster

I suggest to move the explanations of the web interface into its own article, maybe called "Clone & Commit via Web" to keep the individual articles more focused and also because I'm afraid, people wouldn't necessarily look for an explanation of the web UI in an article that's more about Git-over-HTTPS

OK, done. I also changed the order of the subsections. Let me know if you think other parts should be edited.

> I suggest to move the explanations of the web interface into its own article, maybe called "Clone & Commit via Web" to keep the individual articles more focused and also because I'm afraid, people wouldn't necessarily look for an explanation of the web UI in an article that's more about Git-over-HTTPS OK, done. I also changed the order of the subsections. Let me know if you think other parts should be edited.

I will, but it might take a while as I'm a bit time-constrained right now. But I'll get back to you! :)

I will, but it might take a while as I'm a bit time-constrained right now. But I'll get back to you! :)
Poster

I will, but it might take a while as I'm a bit time-constrained right now. But I'll get back to you! :)

No worries

> I will, but it might take a while as I'm a bit time-constrained right now. But I'll get back to you! :) No worries
lhinderberger requested changes 2 years ago
lhinderberger left a comment

Well done 👍

There's only a number of minor suggestions, please see below:

Well done 👍 There's only a number of minor suggestions, please see below:
```bash
~$ git clone https://codeberg.org/JohnDoe/foobar.git
~$ git clone https://codeberg.org/PolarBear/foobar.git

I suggest to keep this consistent and use "knut" instead :)

I suggest to keep this consistent and use "knut" instead :)
Poster

I still don't have access to the "Knut" account (#75), so I cannot do screenshots with Knut. To keep consistency within the article, I use PolarBear in the command lines too.

I still don't have access to the "Knut" account (#75), so I cannot do screenshots with Knut. To keep consistency within the article, I use PolarBear in the command lines too.

Or you could edit your screenshots...

*Or* you could edit your screenshots...
Poster

Yes, I used to do that but it takes actually a lot of time to make sure the font and the colors seem to be "real". I'll try when I'll have some more time.

Yes, I used to do that but it takes actually a lot of time to make sure the font and the colors seem to be "real". I'll try when I'll have some more time.

Thank you.

Thank you.

(it does not need to look "perfect" - we'll probably have to re-do most of the screenshots anyway with #52 😉)

(it does not need to look "perfect" - we'll probably have to re-do most of the screenshots anyway with #52 :wink:)
Poster

Oh, I was not aware of that! I have to look into it too.

Oh, I was not aware of that! I have to look into it too.
Poster

But the way, "Knut" or "knut" (capital or not)?

But the way, "Knut" or "knut" (capital or not)?

The name is Knut but the account name is knut. So for URLs, lower-case should be fine :)

The name is `Knut` but the account name is `knut`. So for URLs, lower-case should be fine :)
ivan-paleo marked this conversation as resolved
```
## Pull
*Pulling* is the reverse of pushing: it synchronizes the modifications (commit) from the remote repository on Codeberg to the local one.

I like the analogy, but strictly speaking pulling is not the reverse of pushing, as it unifies git fetch and git merge.

I like the analogy, but strictly speaking pulling is not the reverse of pushing, as it unifies `git fetch` and `git merge`.
Poster

Would you mind suggesting another wording?

Would you mind suggesting another wording?

I would probably just drop the "reverse of pushing" analogy and keep the rest as it is.

I would probably just drop the "reverse of pushing" analogy and keep the rest as it is.
ivan-paleo marked this conversation as resolved
order: 30
---
Clone, edit, commit, push and pull can be performed using Git directly from the command line, by using a Git client, or via the web interface. The first option is shown in the sections [Clone & Commit via HTTP](/content/git/clone-commit-via-http) and [Clone & Commit via SSH](/content/git/clone-commit-via-ssh). The last option is detailed below.

Please remove the leading /content from the links, as it otherwise yields Error 404.

Please remove the leading `/content` from the links, as it otherwise yields Error 404.

Thinking about it, it might probably be a good idea to auto-generate the link URLs (and maybe even link texts) from the navigation key of an article. -> #84

Thinking about it, it might probably be a good idea to auto-generate the link URLs (and maybe even link texts) from the navigation key of an article. -> #84
ivan-paleo marked this conversation as resolved
## Clone
*Cloning* refers to the process of creating an identical copy of a repository to the local machine.
Copy the repo URL from the Codeberg website to your Git client using the `Copy` icon, or download the repo either as ZIP or TAR.GZ using the `Download Repository` icon.

Downloading the repository as ZIP / Tarball does not contain the version history, so it is not a clone in the context of Git.

I suggest to put the ability to download ZIP / Tarball into its own info box, introducing it with something like:

"If you want to download a copy of a specific state of the repository, without its version history, ...."

Downloading the repository as ZIP / Tarball does not contain the version history, so it is not a clone in the context of Git. I suggest to put the ability to download ZIP / Tarball into its own info box, introducing it with something like: "If you want to download a copy of a specific state of the repository, without its version history, ...."
Poster

Good point!

Good point!
ivan-paleo marked this conversation as resolved
Click on the file you want to edit from the list of files in the repo. Let's try it here with the `README.md` file.
The pencil tool (`Edit File`) will open a new window.
![Edit1](/assets/images/git/clone-commit-via-web/Edit1.png)

File paths are case-sensitive - currently, this does not render with npm run serve. You might want to adjust this path to PNG (or even better, all the other filenames to lowercase).

The style used in Codeberg Documentation is to have filenames kebap-cased

File paths are case-sensitive - currently, this does not render with `npm run serve`. You might want to adjust this path to `PNG` (or even better, all the other filenames to lowercase). The style used in Codeberg Documentation is to have filenames [kebap-cased](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles)
Poster

I usually pay attention, but I did not notice this one because VScode is not case-sensitive. But I've changed all to kebap-cased.

I usually pay attention, but I did not notice this one because VScode is not case-sensitive. But I've changed all to kebap-cased.

Testing the page with npm run serve should be case-sensitive on Windows too, if I remember correctly. So that might be a possibility to check for this class of errors under Windows.

Testing the page with `npm run serve` should be case-sensitive on Windows too, if I remember correctly. So that might be a possibility to check for this class of errors under Windows.
Poster

Probably, but I would have to set it all up, which is not something I can do now. But I'll try later on.

Probably, but I would have to set it all up, which is not something I can do now. But I'll try later on.
ivan-paleo marked this conversation as resolved
![Edit1](/assets/images/git/clone-commit-via-web/Edit1.png)
There you can able to edit the file as you wish.

Typo (drop "able to")

Typo (drop "able to")
ivan-paleo marked this conversation as resolved
![Commit](/assets/images/git/clone-commit-via-web/Commit.PNG)
A commit requires a commit message. A default message is added, but do not hesitate to edit it. In the real world, make sure your commit message is informative, for you, your collaborators and anyone who might be interested in your work. Some advice on how to write a good commit message can be found on countless websites and blogs!

I would drop the "In the real world" and just write "Make sure your commit message..."

I would drop the "In the real world" and just write "Make sure your commit message..."
ivan-paleo marked this conversation as resolved
If you intend to start a pull request with this commit, you should choose the option `Create a new branch for this commit and start a pull request`. It will make it easier to work on the different commits without mixing them if they are in different forks. Check the documentation on [Pull requests and Git flow](/content/collaborating/pull-requests-and-git-flow) for more details.
Validate by clicking on `Commit Changes`.

Wording suggestion: Maybe we should change Validate to Confirm / Submit, maybe even as "Submit your changes".

What is your opinion?

Wording suggestion: Maybe we should change Validate to Confirm / Submit, maybe even as "Submit your changes". What is your opinion?
Poster

I like "Submit your changes", thanks!

I like "Submit your changes", thanks!

You're welcome :)

You're welcome :)
ivan-paleo marked this conversation as resolved
## Push and pull
Synchronizing the modifications (commit) from the local repository to the remote one on Codeberg is called *pushing*.
*Pulling* is the reverse of pushing: it synchronizes the modifications (commit) from the remote repository on Codeberg to the local one.

See above.

See above.
ivan-paleo marked this conversation as resolved
Pulling is important when you work on different computers to make sure that all computers are on the same stage. It is even more important when you have collaborators on a project; they might change the files too, so you need to pull these modifications before you start working.
Because of that, it is recommended to pull before pushing.
Obviously pushing and pulling make sense only if you work locally. This is why there is no "push" or "pull" button on the Codeberg web interface; committing there already pushes to the remote repository on Codeberg, and there is therefore nothing to pull (except pull requests of course).

Wording suggestion: Let's drop "Obviously" (this article describes what's wrong with "obviously": https://css-tricks.com/words-avoid-educational-writing/) :)

Wording suggestion: Let's drop "Obviously" (this article describes what's wrong with "obviously": https://css-tricks.com/words-avoid-educational-writing/) :)
Poster

Thanks for the link!

Thanks for the link!
ivan-paleo marked this conversation as resolved
lhinderberger added
Status: Ready for Review
and removed
Status: Needs feedback
labels 2 years ago
lhinderberger changed title from WIP: Git-related parts of the web interface to Git-related parts of the web interface 2 years ago
lhinderberger added
Status: Review
and removed
Status: Ready for Review
labels 2 years ago
Poster

I've changed according to your comments. Let me know if I missed something.
I have also added webP images.

I've changed according to your comments. Let me know if I missed something. I have also added webP images.
lhinderberger requested changes 2 years ago
lhinderberger left a comment

This looks good now, but please rename your PNG files to a lowercase file extension, i.e. edit2.PNG -> edit2.png. This is already done in the Markdown sources, but not for the files themselves.

This looks good now, but please rename your PNG files to a lowercase file extension, i.e. `edit2.PNG` -> `edit2.png`. This is already done in the Markdown sources, but not for the files themselves.

That is because otherwise browsers without PNG support likely wouldn't be able to find the images e.g. likely leading to broken images on Safari.

That is because otherwise browsers without PNG support likely wouldn't be able to find the images e.g. likely leading to broken images on Safari.
Poster

I was sure I did...

I was sure I did...
Poster

Now the question is how should I submit the new files? VScodium does not see any change to the files... (and that's probably why the corrected names were not pushed)

Now the question is how should I submit the new files? VScodium does not see any change to the files... (and that's probably why the corrected names were not pushed)

Hmm, Windows not recognizing filename case changes as an actual change might be the case here, yes. Have you tried using Git Bash?

Hmm, Windows not recognizing filename case changes as an actual change might be the case here, yes. Have you tried using Git Bash?
Poster

Hmm, Windows not recognizing filename case changes as an actual change might be the case here, yes. Have you tried using Git Bash?

Would you mind helping me with the commands...?

> Hmm, Windows not recognizing filename case changes as an actual change might be the case here, yes. Have you tried using Git Bash? Would you mind helping me with the commands...?

For the beginning, it would be interesting to know the output of git status called from within your copy of Codeberg Documentation.

For the beginning, it would be interesting to know the output of `git status` called from within your copy of Codeberg Documentation.
Poster

For the beginning, it would be interesting to know the output of git status called from within your copy of Codeberg Documentation.

This is what I did

cd [local path]/Documentation/assets/images/git/clone-commit-via-web
git status

And the output:

On branch clone-commit-http
Your branch is up to date with 'origin/clone-commit-http'.
nothing to commit, working tree clean

So should I first delete the files, commit + push, and then add the files again (+ commit + push)?

> For the beginning, it would be interesting to know the output of `git status` called from within your copy of Codeberg Documentation. This is what I did ``` cd [local path]/Documentation/assets/images/git/clone-commit-via-web git status ``` And the output: ``` On branch clone-commit-http Your branch is up to date with 'origin/clone-commit-http'. nothing to commit, working tree clean ``` So should I first delete the files, commit + push, and then add the files again (+ commit + push)?

What does ls -l in that directory output?

What does `ls -l` in that directory output?
Poster

What does ls -l in that directory output?

-rw-r--r-- 1 [my name] 1049089 83733 Sep 29 13:47 clone.png
-rw-r--r-- 1 [my name] 1049089 45044 Sep 29 13:47 clone.webp
-rw-r--r-- 1 [my name] 1049089 33008 Sep 29 13:47 commit.png
-rw-r--r-- 1 [my name] 1049089 16222 Sep 29 13:47 commit.webp
-rw-r--r-- 1 [my name] 1049089 48191 Sep 29 13:47 edit1.png
-rw-r--r-- 1 [my name] 1049089 24838 Sep 29 13:47 edit1.webp
-rw-r--r-- 1 [my name] 1049089 11187 Sep 29 13:47 edit2.png
-rw-r--r-- 1 [my name] 1049089 7408 Sep 29 13:47 edit2.webp

> What does ls -l in that directory output? -rw-r--r-- 1 [my name] 1049089 83733 Sep 29 13:47 clone.png -rw-r--r-- 1 [my name] 1049089 45044 Sep 29 13:47 clone.webp -rw-r--r-- 1 [my name] 1049089 33008 Sep 29 13:47 commit.png -rw-r--r-- 1 [my name] 1049089 16222 Sep 29 13:47 commit.webp -rw-r--r-- 1 [my name] 1049089 48191 Sep 29 13:47 edit1.png -rw-r--r-- 1 [my name] 1049089 24838 Sep 29 13:47 edit1.webp -rw-r--r-- 1 [my name] 1049089 11187 Sep 29 13:47 edit2.png -rw-r--r-- 1 [my name] 1049089 7408 Sep 29 13:47 edit2.webp

Maybe one of the solutions suggested in this StackOverflow post will solve the problem.

Maybe one of the solutions suggested in [this StackOverflow post](https://stackoverflow.com/questions/17683458/how-do-i-commit-case-sensitive-only-filename-changes-in-git) will solve the problem.
Poster

It should be OK now, can you please confirm?

It should be OK now, can you please confirm?
lhinderberger approved these changes 2 years ago
lhinderberger left a comment

Filename case change has worked; PR is approved as far as I'm concerned - thank you! 👍

@n / @hw - Maybe one of you wants to do the other review and, if approved, merge? :)

Filename case change has worked; PR is approved as far as I'm concerned - thank you! :thumbsup: @n / @hw - Maybe one of you wants to do the other review and, if approved, merge? :)
Poster

Thank you for your comments and help!

Thank you for your comments and help!

You're welcome! :)

You're welcome! :)
n approved these changes 2 years ago
n left a comment
Collaborator

looks good to me!

looks good to me!
n merged commit 59a1bd21af into master 2 years ago
n commented 2 years ago
Collaborator

Merged and deployed. Thank you @ivan-paleo.

Merged and deployed. Thank you @ivan-paleo.
Poster

Same here: ...ivan-paleo@users.noreply.github.com...

Same here: ...ivan-paleo@users.noreply.github.com...

Reviewers

lhinderberger approved these changes 2 years ago
n approved these changes 2 years ago
The pull request has been merged as 59a1bd21af.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.