Replaced references to git.kjodle.net with codeberg.org

This commit is contained in:
Kenneth John Odle 2024-08-22 07:46:58 -04:00
parent a5f0a5456e
commit 1e42393d60

View File

@ -270,28 +270,28 @@ origin https://github.com/chrislgarry/Apollo-11 (fetch)
origin https://github.com/chrislgarry/Apollo-11 (push)
\end{Verbatim}
Of course, those remote repositories don't belong to you, so you can't push any changes you make to them. What you can do is create your own remote repo on a Git-hosting system. I'll do that on my Git site at \kref{https://git.kjodle.net/kjodle/Apollo-11}{https://git.kjodle.net/kjodle/Apollo-11}. To add that remote to my local repo, I will use this:
Of course, those remote repositories don't belong to you, so you can't push any changes you make to them. What you can do is create your own remote repo on a Git-hosting system. I'll do that on my Git site at \kref{https://codeberg.org/kjodle/Apollo-11}{https://codeberg.org/kjodle/Apollo-11}. To add that remote to my local repo, I will use this:
\input{include/remoteadd}
And running the \texttt{git remote -v} command again shows that I have two different remotes:
\begin{Verbatim}[]
ogit https://git.kjodle.net/kjodle/Apollo-11 (fetch)
ogit https://git.kjodle.net/kjodle/Apollo-11 (push)
berg https://codeberg.org/kjodle/Apollo-11 (fetch)
berg https://codeberg.org/kjodle/Apollo-11 (push)
origin https://github.com/chrislgarry/Apollo-11 (fetch)
origin https://github.com/chrislgarry/Apollo-11 (push)
\end{Verbatim}
I named my remote ``ogit'', which is the first letter of my last name combined with ``git''. I need to get rid of those remotes on GitHub, since I can't push any changes to them anyway. To do that I'll use this command:
I named my remote ``berg'', to distinguish it from the ``origin''. I need to get rid of those remotes on GitHub, since I can't push any changes to them anyway. To do that I'll use this command:
\input{include/remoteremove}
Running \texttt{git remote -v} again shows that I now just have the remote on my own website:
\begin{Verbatim}[]
ogit https://git.kjodle.net/kjodle/Apollo-11 (fetch)
ogit https://git.kjodle.net/kjodle/Apollo-11 (push)
berg https://codeberg.org/kjodle/Apollo-11 (fetch)
berg https://codeberg.org/kjodle/Apollo-11 (push)
\end{Verbatim}
Are we ready to upload this code from my local repository to my remote repo? Not yet. Let's see what our local branches are by running \texttt{git branch}, which gives us this:
@ -327,13 +327,13 @@ Writing objects: 100% (3414/3414), 3.01 MiB | 1.69 MiB/s, done.
Total 3414 (delta 2327), reused 3414 (delta 2327), pack-reused 0
remote: . Processing 1 references
remote: Processed 1 references in total
To https://git.kjodle.net/kjodle/Apollo-11
To https://codeberg.org/kjodle/Apollo-11
* [new branch] main -> main
\end{Verbatim}
That really did take only about 1 second to push 3.1 MiB\footnote{That's not a typo. MiB stands for a \texttt{mebibyte}. See ``The Later Salad Days'' in issue \#2 for more information.} of data. One of the nice things about Git is that it is remarkably fast.
If you visit that original repository that I cloned on GitHub, you'll see that it has 547 commits. If you then visit the repository I created at \kref{https://git.kjodle.net/kjodle/Apollo-11}{https://git.kjodle.net/kjodle/Apollo-11}, you'll see that it also has 547 commits. This is one of the nice things about Git: when you clone that remote repository, you are getting \textit{everything} associated with that repo. Other version control applications just checkout the most recent version. Hence the term ``clone'' rather than ``checkout''.
If you visit that original repository that I cloned on GitHub, you'll see that it has 547 commits. If you then visit the repository I created at \kref{https://codeberg.org/kjodle/Apollo-11}{https://codeberg.org/kjodle/Apollo-11}, you'll see that it also has 547 commits. This is one of the nice things about Git: when you clone that remote repository, you are getting \textit{everything} associated with that repo. Other version control applications just checkout the most recent version. Hence the term ``clone'' rather than ``checkout''.
For what it's worth, you can have multiple remotes. I can create a remote repository on GitHub, clone it to my local machine, then create a remote somewhere else and add that remote to my local repo. To keep both remotes up to date with local changes, you'll need to push twice, once with \texttt{git push remote1 main} and again with \texttt{git push remote2 main}.