<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.redbrick.dcu.ie/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Digi</id>
	<title>Redbrick Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.redbrick.dcu.ie/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Digi"/>
	<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/Special:Contributions/Digi"/>
	<updated>2026-04-22T01:39:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11301</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11301"/>
		<updated>2026-04-11T21:42:49Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Git is a distributed version control system, like Mercurial.&lt;br /&gt;
&lt;br /&gt;
If you are looking for a guide on how to host your git repo on Redbrick, click [[Hosting_a_Git_Repo_on_Redbrick|here]]!&lt;br /&gt;
&lt;br /&gt;
For this guide we will be using the Git CLI.&lt;br /&gt;
&lt;br /&gt;
== What is Git? ==&lt;br /&gt;
&lt;br /&gt;
Git is a version control system, used by almost every developer. It allows you to see changes you&#039;ve made to your code and roll back the project or specific files to previous versions. It is extremely useful for collaborating with several developers via a remote repository and for finding out what happened when a change breaks your project. &lt;br /&gt;
&lt;br /&gt;
== How does it work? ==&lt;br /&gt;
&lt;br /&gt;
Git takes &amp;quot;snapshots&amp;quot; of your project whenever a change was made. To save on space, if a file was not changed it will link to the original file instead of making a copy. Think of it as copy and pasting a directory and making a change on the new one, but all of the unchanged files in the new copy are just shortcuts to the files in the old one.&lt;br /&gt;
&lt;br /&gt;
There are three main states in a git repository: &lt;br /&gt;
* The Working Directory. This the code you are working on, and you can make changes as you like!&lt;br /&gt;
* The Staging Area. These are the files that you plan for git to save a snapshot of.&lt;br /&gt;
* The Git Repository (repo). This is the &amp;quot;.git&amp;quot; directory made when you initialize a new repo. It tracks and saves the snapshots of your files. &lt;br /&gt;
&lt;br /&gt;
In practice, it looks like this:&lt;br /&gt;
* You work on your code and make changes&lt;br /&gt;
* You &amp;quot;stage&amp;quot; the files you&#039;ve changed&lt;br /&gt;
* You then &amp;quot;commit&amp;quot; these staged files, adding them to the repository.&lt;br /&gt;
&lt;br /&gt;
== Creating Your First Repository ==&lt;br /&gt;
&lt;br /&gt;
Say you have a project that you want to backup with git in ~/my/project. First we need to navigate to the project with the cd command:&lt;br /&gt;
    cd ~/my/project&lt;br /&gt;
&lt;br /&gt;
Then we create the repository:&lt;br /&gt;
    git init&lt;br /&gt;
&lt;br /&gt;
We can then stage the files. The * here means all of the files in the directory:&lt;br /&gt;
    git add *&lt;br /&gt;
&lt;br /&gt;
Finally, we can commit the changes:&lt;br /&gt;
    git commit -m &amp;quot;initial commit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you have sensitive files you don&#039;t want to be added to the repository, such as .env files, you can use a &#039;&#039;&#039;.gitignore&#039;&#039;&#039; file at the project root.&lt;br /&gt;
    cd ~/my/project&lt;br /&gt;
    touch .gitignore&lt;br /&gt;
&lt;br /&gt;
Any files or directories specified in the gitignore will not be added to your repository. For example:&lt;br /&gt;
    *.env # ignores any files with the extension .env&lt;br /&gt;
    hello.* # ignores any files starting with hello.&lt;br /&gt;
    /foo # ignores the entire directory foo&lt;br /&gt;
&lt;br /&gt;
You can also specifically allow files or directories inside of ignored directories using an !:&lt;br /&gt;
    !/foo/bar # specifically allows the file bar in the foo directory, even though foo is in the gitignore file&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11300</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11300"/>
		<updated>2026-04-11T21:23:28Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Git is a distributed version control system, like Mercurial.&lt;br /&gt;
&lt;br /&gt;
If you are looking for a guide on how to host your git repo on Redbrick, click [[Hosting_a_Git_Repo_on_Redbrick|here]]!&lt;br /&gt;
&lt;br /&gt;
== What is Git? ==&lt;br /&gt;
&lt;br /&gt;
Git is a version control system, used by almost every developer. It allows you to see changes you&#039;ve made to your code and roll back the project or specific files to previous versions. It is extremely useful for collaborating with several developers via a remote repository and for finding out what happened when a change breaks your project. &lt;br /&gt;
&lt;br /&gt;
== How does it work? ==&lt;br /&gt;
&lt;br /&gt;
Git takes &amp;quot;snapshots&amp;quot; of your project whenever a change was made. To save on space, if a file was not changed it will link to the original file instead of making a copy. Think of it as copy and pasting a directory and making a change on the new one, but all of the unchanged files in the new copy are just shortcuts to the files in the old one.&lt;br /&gt;
&lt;br /&gt;
There are three main states in a git repository: &lt;br /&gt;
* The Working Directory. This the code you are working on, and you can make changes as you like!&lt;br /&gt;
* The Staging Area. These are the files that you plan for git to save a snapshot of.&lt;br /&gt;
* The Git Repository (repo). This is the &amp;quot;.git&amp;quot; directory made when you initialize a new repo. It tracks and saves the snapshots of your files. &lt;br /&gt;
&lt;br /&gt;
In practice, it looks like this:&lt;br /&gt;
* You work on your code and make changes&lt;br /&gt;
* You &amp;quot;stage&amp;quot; the files you&#039;ve changed&lt;br /&gt;
* You then &amp;quot;commit&amp;quot; these staged files, adding them to the repository.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11299</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11299"/>
		<updated>2026-04-11T21:21:59Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Git is a distributed version control system, like Mercurial.&lt;br /&gt;
&lt;br /&gt;
If you are looking for a guide on how to host your git repo on Redbrick, click [[Hosting_a_Git_Repo_on_Redbrick|here]]!&lt;br /&gt;
&lt;br /&gt;
== What is Git? ==&lt;br /&gt;
&lt;br /&gt;
**Git** is a version control system, used by almost every developer. It allows you to see changes you&#039;ve made to your code and roll back the project or specific files to previous versions. It is extremely useful for collaborating with several developers via a remote repository and for finding out what happened when a change breaks your project. &lt;br /&gt;
&lt;br /&gt;
== How does it work? ==&lt;br /&gt;
&lt;br /&gt;
Git takes &amp;quot;snapshots&amp;quot; of your project whenever a change was made. To save on space, if a file was not changed it will link to the original file instead of making a copy. Think of it as copy and pasting a directory and making a change on the new one, but all of the unchanged files in the new copy are just shortcuts to the files in the old one.&lt;br /&gt;
&lt;br /&gt;
There are three main states in a git repository: &lt;br /&gt;
- The Working Directory. This the code you are working on, and you can make changes as you like!&lt;br /&gt;
- The Staging Area. These are the files that you plan for git to save a snapshot of.&lt;br /&gt;
- The Git Repository (repo). This is the &amp;quot;.git&amp;quot; directory made when you initialize a new repo. It tracks and saves the snapshots of your files. &lt;br /&gt;
&lt;br /&gt;
In practice, it looks like this:&lt;br /&gt;
- You work on your code and make changes&lt;br /&gt;
- You &amp;quot;stage&amp;quot; the files you&#039;ve changed&lt;br /&gt;
- You then &amp;quot;commit&amp;quot; these staged files, adding them to the repository.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11298</id>
		<title>Hosting a Git Repo on Redbrick</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11298"/>
		<updated>2026-04-11T20:54:41Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The beginners guide on how to use Git is [[Git|here]]! &lt;br /&gt;
Here&#039;s a badly written and terribly phrased guide on how to get and use a repository on redbrick&#039;s git hosting area.&lt;br /&gt;
[https://git.redbrick.dcu.ie git.redbrick.dcu.ie] is currently not working. However, this guide will hopefully be of use when it is! &lt;br /&gt;
&lt;br /&gt;
== Getting a git repository on Redbrick ==&lt;br /&gt;
&lt;br /&gt;
Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. The world has read-only access via the web interface at [http://git.redbrick.dcu.ie git.redbrick.dcu.ie]. It&#039;s perfect for any small open source projects you feel like starting, or if you want to branch/fork an existing open source project that&#039;s hosted on git.&lt;br /&gt;
&lt;br /&gt;
=== Can I have a private repository that the world can&#039;t see? ===&lt;br /&gt;
Yes any repository can be public or private.&lt;br /&gt;
&lt;br /&gt;
=== Can I use this to host my third year/fourth year/other important college project? ===&lt;br /&gt;
Short answer: No. And you shouldn&#039;t do this in your redbrick home directory either. There have been a number of times in the past where Redbrick has experienced problems meaning that a user who had the only copy (or the only backup copy) of a project weren&#039;t able to access it at some important deadline.&lt;br /&gt;
&lt;br /&gt;
Long answer: If you have other copies of your code, and Redbrick isn&#039;t the primary (only) backup of it, and you just wanted to have yet another backup of it &amp;quot;just because&amp;quot;, then &#039;&#039;maybe&#039;&#039; it might make sense to put it on redbrick. But I still wouldn&#039;t.&lt;br /&gt;
 &lt;br /&gt;
=== Creating an SSH key pair ===&lt;br /&gt;
Before you can use redbrick&#039;s git repositories from one of your computers (or from your redbrick shell), you need to create a public/private SSH keypair there if you haven&#039;t already. You&#039;ll need to do this for every device/place that you want to access git from. This might sound annoying, but it also lets you use git without having to type a password every time you need to clone/push/pull.&lt;br /&gt;
&lt;br /&gt;
To do this on a Unixey (Linux/Mac OS X/on redbrick) system, run:&lt;br /&gt;
&lt;br /&gt;
  ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
You&#039;ll probably want to hit enter for most/all of the default options. Especially the first one (where to save the key). When it&#039;s done, you&#039;ll probably see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[you@your-computer ~]$ ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/Users/you/.ssh/id_rsa): &lt;br /&gt;
Enter passphrase (empty for no passphrase): &lt;br /&gt;
Enter same passphrase again: &lt;br /&gt;
Your identification has been saved in /Users/you/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /Users/you/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
58:06:86:0c:83:5e:4e:ab:75:93:96:37:76:42:73:07 you@your-computer.local&lt;br /&gt;
The key&#039;s randomart image is:&lt;br /&gt;
+--[ RSA 2048]----+&lt;br /&gt;
| .oo .o  E.      |&lt;br /&gt;
|.  +o. + . .     |&lt;br /&gt;
|. + . + = .      |&lt;br /&gt;
| . + * O .       |&lt;br /&gt;
|  o o = S        |&lt;br /&gt;
| .               |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
+-----------------+&lt;br /&gt;
[you@your-computer ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the little ascii art bit might not show up on older versions of SSH).&lt;br /&gt;
&lt;br /&gt;
This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your &#039;&#039;&#039;private&#039;&#039;&#039; SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the repository ===&lt;br /&gt;
Once the admins have done their work, you need to actually create the repository. You do this on your own computer (or redbrick account, or wherever one of your keys came from). If you asked the admins to create you a repository named &amp;quot;awesomeproject&amp;quot;, you&#039;d do the following:&lt;br /&gt;
&lt;br /&gt;
  mkdir awesomeproject&lt;br /&gt;
  cd awesomeproject&lt;br /&gt;
  git init&lt;br /&gt;
  git remote add origin git@git.redbrick.dcu.ie:awesomeproject.git&lt;br /&gt;
  &lt;br /&gt;
At this point you should do some work, like create a file and put something into it, or whatever. This is where a proper guide to git would be handy. Then commit your changes and do a first push:&lt;br /&gt;
&lt;br /&gt;
  git commit -a -m &amp;quot;My first commit&amp;quot;&lt;br /&gt;
  git push origin master:refs/heads/master&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Things to look out for:&#039;&#039; When you&#039;re doing the &amp;quot;git remote add origin&amp;quot; command, make sure you add &amp;quot;.git&amp;quot; to the end of the repository name. The system that redbrick uses (called Gitea, if anybody cares) to manage repositories needs that there. Also, in &amp;quot;git@git.redbrick.dcu.ie&amp;quot;, the &amp;quot;git&amp;quot; user isn&#039;t a placeholder. You need use that user, not your own redbrick username.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11297</id>
		<title>Hosting a Git Repo on Redbrick</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11297"/>
		<updated>2026-04-11T20:54:24Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The beginners guide on how to use Git is [[Git|here]]! &lt;br /&gt;
Here&#039;s a badly written and terribly phrased guide on how to get and use a repository on redbrick&#039;s git hosting area.&lt;br /&gt;
[https://git.redbrick.dcu.ie git.redbrick.dcu.ie] is currently not working. However, this guide will hopefully be of use when it is! &lt;br /&gt;
&lt;br /&gt;
== Getting a git repository on Redbrick ==&lt;br /&gt;
&lt;br /&gt;
Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. The world has read-only access via the web interface at [[http://git.redbrick.dcu.ie git.redbrick.dcu.ie]]. It&#039;s perfect for any small open source projects you feel like starting, or if you want to branch/fork an existing open source project that&#039;s hosted on git.&lt;br /&gt;
&lt;br /&gt;
=== Can I have a private repository that the world can&#039;t see? ===&lt;br /&gt;
Yes any repository can be public or private.&lt;br /&gt;
&lt;br /&gt;
=== Can I use this to host my third year/fourth year/other important college project? ===&lt;br /&gt;
Short answer: No. And you shouldn&#039;t do this in your redbrick home directory either. There have been a number of times in the past where Redbrick has experienced problems meaning that a user who had the only copy (or the only backup copy) of a project weren&#039;t able to access it at some important deadline.&lt;br /&gt;
&lt;br /&gt;
Long answer: If you have other copies of your code, and Redbrick isn&#039;t the primary (only) backup of it, and you just wanted to have yet another backup of it &amp;quot;just because&amp;quot;, then &#039;&#039;maybe&#039;&#039; it might make sense to put it on redbrick. But I still wouldn&#039;t.&lt;br /&gt;
 &lt;br /&gt;
=== Creating an SSH key pair ===&lt;br /&gt;
Before you can use redbrick&#039;s git repositories from one of your computers (or from your redbrick shell), you need to create a public/private SSH keypair there if you haven&#039;t already. You&#039;ll need to do this for every device/place that you want to access git from. This might sound annoying, but it also lets you use git without having to type a password every time you need to clone/push/pull.&lt;br /&gt;
&lt;br /&gt;
To do this on a Unixey (Linux/Mac OS X/on redbrick) system, run:&lt;br /&gt;
&lt;br /&gt;
  ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
You&#039;ll probably want to hit enter for most/all of the default options. Especially the first one (where to save the key). When it&#039;s done, you&#039;ll probably see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[you@your-computer ~]$ ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/Users/you/.ssh/id_rsa): &lt;br /&gt;
Enter passphrase (empty for no passphrase): &lt;br /&gt;
Enter same passphrase again: &lt;br /&gt;
Your identification has been saved in /Users/you/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /Users/you/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
58:06:86:0c:83:5e:4e:ab:75:93:96:37:76:42:73:07 you@your-computer.local&lt;br /&gt;
The key&#039;s randomart image is:&lt;br /&gt;
+--[ RSA 2048]----+&lt;br /&gt;
| .oo .o  E.      |&lt;br /&gt;
|.  +o. + . .     |&lt;br /&gt;
|. + . + = .      |&lt;br /&gt;
| . + * O .       |&lt;br /&gt;
|  o o = S        |&lt;br /&gt;
| .               |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
+-----------------+&lt;br /&gt;
[you@your-computer ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the little ascii art bit might not show up on older versions of SSH).&lt;br /&gt;
&lt;br /&gt;
This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your &#039;&#039;&#039;private&#039;&#039;&#039; SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the repository ===&lt;br /&gt;
Once the admins have done their work, you need to actually create the repository. You do this on your own computer (or redbrick account, or wherever one of your keys came from). If you asked the admins to create you a repository named &amp;quot;awesomeproject&amp;quot;, you&#039;d do the following:&lt;br /&gt;
&lt;br /&gt;
  mkdir awesomeproject&lt;br /&gt;
  cd awesomeproject&lt;br /&gt;
  git init&lt;br /&gt;
  git remote add origin git@git.redbrick.dcu.ie:awesomeproject.git&lt;br /&gt;
  &lt;br /&gt;
At this point you should do some work, like create a file and put something into it, or whatever. This is where a proper guide to git would be handy. Then commit your changes and do a first push:&lt;br /&gt;
&lt;br /&gt;
  git commit -a -m &amp;quot;My first commit&amp;quot;&lt;br /&gt;
  git push origin master:refs/heads/master&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Things to look out for:&#039;&#039; When you&#039;re doing the &amp;quot;git remote add origin&amp;quot; command, make sure you add &amp;quot;.git&amp;quot; to the end of the repository name. The system that redbrick uses (called Gitea, if anybody cares) to manage repositories needs that there. Also, in &amp;quot;git@git.redbrick.dcu.ie&amp;quot;, the &amp;quot;git&amp;quot; user isn&#039;t a placeholder. You need use that user, not your own redbrick username.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11296</id>
		<title>Hosting a Git Repo on Redbrick</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Hosting_a_Git_Repo_on_Redbrick&amp;diff=11296"/>
		<updated>2026-04-11T20:53:38Z</updated>

		<summary type="html">&lt;p&gt;Digi: Created page with &amp;quot;The beginners guide on how to use Git is here!  Here&amp;#039;s a badly written and terribly phrased guide on how to get and use a repository on redbrick&amp;#039;s git hosting area. [https://git.redbrick.dcu.ie git.redbrick.dcu.ie] is currently not working. However, this guide will hopefully be of use when it is!   == Getting a git repository on Redbrick ==  Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. Th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The beginners guide on how to use Git is [[Git|here]]! &lt;br /&gt;
Here&#039;s a badly written and terribly phrased guide on how to get and use a repository on redbrick&#039;s git hosting area.&lt;br /&gt;
[https://git.redbrick.dcu.ie git.redbrick.dcu.ie] is currently not working. However, this guide will hopefully be of use when it is! &lt;br /&gt;
&lt;br /&gt;
== Getting a git repository on Redbrick ==&lt;br /&gt;
&lt;br /&gt;
Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. The world has read-only access via the web interface at [[http://git.redbrick.dcu.ie]]. It&#039;s perfect for any small open source projects you feel like starting, or if you want to branch/fork an existing open source project that&#039;s hosted on git.&lt;br /&gt;
&lt;br /&gt;
=== Can I have a private repository that the world can&#039;t see? ===&lt;br /&gt;
Yes any repository can be public or private.&lt;br /&gt;
&lt;br /&gt;
=== Can I use this to host my third year/fourth year/other important college project? ===&lt;br /&gt;
Short answer: No. And you shouldn&#039;t do this in your redbrick home directory either. There have been a number of times in the past where Redbrick has experienced problems meaning that a user who had the only copy (or the only backup copy) of a project weren&#039;t able to access it at some important deadline.&lt;br /&gt;
&lt;br /&gt;
Long answer: If you have other copies of your code, and Redbrick isn&#039;t the primary (only) backup of it, and you just wanted to have yet another backup of it &amp;quot;just because&amp;quot;, then &#039;&#039;maybe&#039;&#039; it might make sense to put it on redbrick. But I still wouldn&#039;t.&lt;br /&gt;
 &lt;br /&gt;
=== Creating an SSH key pair ===&lt;br /&gt;
Before you can use redbrick&#039;s git repositories from one of your computers (or from your redbrick shell), you need to create a public/private SSH keypair there if you haven&#039;t already. You&#039;ll need to do this for every device/place that you want to access git from. This might sound annoying, but it also lets you use git without having to type a password every time you need to clone/push/pull.&lt;br /&gt;
&lt;br /&gt;
To do this on a Unixey (Linux/Mac OS X/on redbrick) system, run:&lt;br /&gt;
&lt;br /&gt;
  ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
You&#039;ll probably want to hit enter for most/all of the default options. Especially the first one (where to save the key). When it&#039;s done, you&#039;ll probably see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[you@your-computer ~]$ ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/Users/you/.ssh/id_rsa): &lt;br /&gt;
Enter passphrase (empty for no passphrase): &lt;br /&gt;
Enter same passphrase again: &lt;br /&gt;
Your identification has been saved in /Users/you/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /Users/you/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
58:06:86:0c:83:5e:4e:ab:75:93:96:37:76:42:73:07 you@your-computer.local&lt;br /&gt;
The key&#039;s randomart image is:&lt;br /&gt;
+--[ RSA 2048]----+&lt;br /&gt;
| .oo .o  E.      |&lt;br /&gt;
|.  +o. + . .     |&lt;br /&gt;
|. + . + = .      |&lt;br /&gt;
| . + * O .       |&lt;br /&gt;
|  o o = S        |&lt;br /&gt;
| .               |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
+-----------------+&lt;br /&gt;
[you@your-computer ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the little ascii art bit might not show up on older versions of SSH).&lt;br /&gt;
&lt;br /&gt;
This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your &#039;&#039;&#039;private&#039;&#039;&#039; SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the repository ===&lt;br /&gt;
Once the admins have done their work, you need to actually create the repository. You do this on your own computer (or redbrick account, or wherever one of your keys came from). If you asked the admins to create you a repository named &amp;quot;awesomeproject&amp;quot;, you&#039;d do the following:&lt;br /&gt;
&lt;br /&gt;
  mkdir awesomeproject&lt;br /&gt;
  cd awesomeproject&lt;br /&gt;
  git init&lt;br /&gt;
  git remote add origin git@git.redbrick.dcu.ie:awesomeproject.git&lt;br /&gt;
  &lt;br /&gt;
At this point you should do some work, like create a file and put something into it, or whatever. This is where a proper guide to git would be handy. Then commit your changes and do a first push:&lt;br /&gt;
&lt;br /&gt;
  git commit -a -m &amp;quot;My first commit&amp;quot;&lt;br /&gt;
  git push origin master:refs/heads/master&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Things to look out for:&#039;&#039; When you&#039;re doing the &amp;quot;git remote add origin&amp;quot; command, make sure you add &amp;quot;.git&amp;quot; to the end of the repository name. The system that redbrick uses (called Gitea, if anybody cares) to manage repositories needs that there. Also, in &amp;quot;git@git.redbrick.dcu.ie&amp;quot;, the &amp;quot;git&amp;quot; user isn&#039;t a placeholder. You need use that user, not your own redbrick username.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11295</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Git&amp;diff=11295"/>
		<updated>2026-04-11T20:40:37Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Git is a distributed version control system, like Mercurial.&lt;br /&gt;
&lt;br /&gt;
At some stage, someone might put up a full tutorial showing how to use git, but for now, here&#039;s a badly written and terribly phrased guide on how to get and use a repository on redbrick&#039;s git hosting area.&lt;br /&gt;
[https://git.redbrick.dcu.ie git.redbrick.dcu.ie] is alive again. &lt;br /&gt;
&lt;br /&gt;
== Getting a git repository on Redbrick ==&lt;br /&gt;
&lt;br /&gt;
Redbrick hosts git repositories for users. You (and any other users you want) can have write access to the repositories. The world has read-only access via the web interface at [[http://git.redbrick.dcu.ie]]. It&#039;s perfect for any small open source projects you feel like starting, or if you want to branch/fork an existing open source project that&#039;s hosted on git.&lt;br /&gt;
&lt;br /&gt;
=== Can I have a private repository that the world can&#039;t see? ===&lt;br /&gt;
Yes any repository can be public or private.&lt;br /&gt;
&lt;br /&gt;
=== Can I use this to host my third year/fourth year/other important college project? ===&lt;br /&gt;
Short answer: No. And you shouldn&#039;t do this in your redbrick home directory either. There have been a number of times in the past where Redbrick has experienced problems meaning that a user who had the only copy (or the only backup copy) of a project weren&#039;t able to access it at some important deadline.&lt;br /&gt;
&lt;br /&gt;
Long answer: If you have other copies of your code, and Redbrick isn&#039;t the primary (only) backup of it, and you just wanted to have yet another backup of it &amp;quot;just because&amp;quot;, then &#039;&#039;maybe&#039;&#039; it might make sense to put it on redbrick. But I still wouldn&#039;t.&lt;br /&gt;
 &lt;br /&gt;
=== Creating an SSH key pair ===&lt;br /&gt;
Before you can use redbrick&#039;s git repositories from one of your computers (or from your redbrick shell), you need to create a public/private SSH keypair there if you haven&#039;t already. You&#039;ll need to do this for every device/place that you want to access git from. This might sound annoying, but it also lets you use git without having to type a password every time you need to clone/push/pull.&lt;br /&gt;
&lt;br /&gt;
To do this on a Unixey (Linux/Mac OS X/on redbrick) system, run:&lt;br /&gt;
&lt;br /&gt;
  ssh-keygen -t rsa&lt;br /&gt;
&lt;br /&gt;
You&#039;ll probably want to hit enter for most/all of the default options. Especially the first one (where to save the key). When it&#039;s done, you&#039;ll probably see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[you@your-computer ~]$ ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/Users/you/.ssh/id_rsa): &lt;br /&gt;
Enter passphrase (empty for no passphrase): &lt;br /&gt;
Enter same passphrase again: &lt;br /&gt;
Your identification has been saved in /Users/you/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /Users/you/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
58:06:86:0c:83:5e:4e:ab:75:93:96:37:76:42:73:07 you@your-computer.local&lt;br /&gt;
The key&#039;s randomart image is:&lt;br /&gt;
+--[ RSA 2048]----+&lt;br /&gt;
| .oo .o  E.      |&lt;br /&gt;
|.  +o. + . .     |&lt;br /&gt;
|. + . + = .      |&lt;br /&gt;
| . + * O .       |&lt;br /&gt;
|  o o = S        |&lt;br /&gt;
| .               |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
+-----------------+&lt;br /&gt;
[you@your-computer ~]$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(the little ascii art bit might not show up on older versions of SSH).&lt;br /&gt;
&lt;br /&gt;
This has created two files on your computer - id_rsa and id_rsa.pub. id_rsa is your &#039;&#039;&#039;private&#039;&#039;&#039; SSH key, and id_rsa.pub is the corresponding public key. You keep id_rsa to yourself, and you can give id_rsa.pub to admins to allow you to access a repository. You can also upload it to a remote server (like redbrick) and put it in a specific location to allow you passwordless logins, but you can google for how to do that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the repository ===&lt;br /&gt;
Once the admins have done their work, you need to actually create the repository. You do this on your own computer (or redbrick account, or wherever one of your keys came from). If you asked the admins to create you a repository named &amp;quot;awesomeproject&amp;quot;, you&#039;d do the following:&lt;br /&gt;
&lt;br /&gt;
  mkdir awesomeproject&lt;br /&gt;
  cd awesomeproject&lt;br /&gt;
  git init&lt;br /&gt;
  git remote add origin git@git.redbrick.dcu.ie:awesomeproject.git&lt;br /&gt;
  &lt;br /&gt;
At this point you should do some work, like create a file and put something into it, or whatever. This is where a proper guide to git would be handy. Then commit your changes and do a first push:&lt;br /&gt;
&lt;br /&gt;
  git commit -a -m &amp;quot;My first commit&amp;quot;&lt;br /&gt;
  git push origin master:refs/heads/master&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Things to look out for:&#039;&#039; When you&#039;re doing the &amp;quot;git remote add origin&amp;quot; command, make sure you add &amp;quot;.git&amp;quot; to the end of the repository name. The system that redbrick uses (called Gitea, if anybody cares) to manage repositories needs that there. Also, in &amp;quot;git@git.redbrick.dcu.ie&amp;quot;, the &amp;quot;git&amp;quot; user isn&#039;t a placeholder. You need use that user, not your own redbrick username.&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=User:Ayden&amp;diff=11278</id>
		<title>User:Ayden</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=User:Ayden&amp;diff=11278"/>
		<updated>2026-04-01T21:34:04Z</updated>

		<summary type="html">&lt;p&gt;Digi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An admin alright. &amp;lt;sup&amp;gt;[[User:Ayden|&amp;lt;nowiki&amp;gt;[citation needed]&amp;lt;/nowiki&amp;gt;]]&amp;lt;/sup&amp;gt;&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
	<entry>
		<id>https://wiki.redbrick.dcu.ie/index.php?title=Vim_text_editor&amp;diff=11276</id>
		<title>Vim text editor</title>
		<link rel="alternate" type="text/html" href="https://wiki.redbrick.dcu.ie/index.php?title=Vim_text_editor&amp;diff=11276"/>
		<updated>2026-03-23T00:01:26Z</updated>

		<summary type="html">&lt;p&gt;Digi: Add navigation section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===&#039;&#039;&#039;What is Vim&#039;&#039;&#039;===&lt;br /&gt;
Vim is a text editor. Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code, its full name is Vi IMproved. While Vim is cross-platform, it is most popular on Unix-like operating systems.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Interface&#039;&#039;&#039;===&lt;br /&gt;
Vim&#039;s interface is based not on menus or icons but on commands given in a text user interface. For many users, Vim may present a steep learning curve, meaning that learning is slow initially but once the user gets a grasp of the basics they progress quickly and their editing becomes more efficient.&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;&#039;The Basics&#039;&#039;&#039;==&lt;br /&gt;
to start vim and edit a file (new or existing)&lt;br /&gt;
    vim file_name&lt;br /&gt;
to start vim in NetRW (file tree)&lt;br /&gt;
    vim .&lt;br /&gt;
&lt;br /&gt;
to write your changes&lt;br /&gt;
    :w&lt;br /&gt;
to quit vim&lt;br /&gt;
    :q&lt;br /&gt;
you can also combine these&lt;br /&gt;
    :wq&lt;br /&gt;
to write to a file&lt;br /&gt;
    :w &amp;lt;file&amp;gt;&lt;br /&gt;
to quit without saving&lt;br /&gt;
    :q!&lt;br /&gt;
to enter NetRW&lt;br /&gt;
    :Ex&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Normal Mode&#039;&#039;&#039;===&lt;br /&gt;
Normal mode is the default mode you are in when you enter Vim. This is the mode you will spend most of your time in, as it&#039;s used to navigate around your file. To go back to normal mode hit &#039;ESC&#039; on your keyboard.&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;&#039;Navigation&#039;&#039;&#039;====&lt;br /&gt;
To navigate in Vim you primarily use the &lt;br /&gt;
    &#039;&#039;&#039;I&#039;&#039;&#039; &#039;&#039;&#039;J&#039;&#039;&#039; &#039;&#039;&#039;K&#039;&#039;&#039; &#039;&#039;&#039;L&#039;&#039;&#039;&lt;br /&gt;
keys, to navigate to the &lt;br /&gt;
    &#039;&#039;&#039;left&#039;&#039;&#039; &#039;&#039;&#039;down&#039;&#039;&#039; &#039;&#039;&#039;up&#039;&#039;&#039; &#039;&#039;&#039;right&#039;&#039;&#039; &lt;br /&gt;
directions respectively.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
    &#039;&#039;&#039;J&#039;&#039;&#039;&lt;br /&gt;
will bring your cursor 1 line down!&lt;br /&gt;
You can also add a number to vim commands to do them that number of times.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
    &#039;&#039;&#039;5J&#039;&#039;&#039;&lt;br /&gt;
will bring your cursor 5 lines down!&lt;br /&gt;
&lt;br /&gt;
There are also other keys to move your cursor such as:&lt;br /&gt;
    &#039;&#039;&#039;W&#039;&#039;&#039;&lt;br /&gt;
which moves your cursor forward one word,&lt;br /&gt;
    &#039;&#039;&#039;B&#039;&#039;&#039;&lt;br /&gt;
which moves your cursor back one word,&lt;br /&gt;
    &#039;&#039;&#039;G&#039;&#039;&#039;&lt;br /&gt;
which moves your cursor to the final line of the file,&lt;br /&gt;
    &#039;&#039;&#039;gg&#039;&#039;&#039;&lt;br /&gt;
which moves your cursor to the first line of the file, and&lt;br /&gt;
    &#039;&#039;&#039;f&amp;lt;character&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
which moves your cursor to the next instance of &amp;lt;character&amp;gt; on the current line!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Searching for Words&#039;&#039;&#039;===&lt;br /&gt;
Suppose you want to find all the words apple in your file&lt;br /&gt;
1. Make sure you are in command mode&lt;br /&gt;
    by hitting ESC&lt;br /&gt;
&lt;br /&gt;
2. type&lt;br /&gt;
    /apple&lt;br /&gt;
followed by ENTER to find an occurrence of apple. When you type the slash, it and the following characters will be shown on the bottom of the screen. After you press ENTER, the cursor will go to the first occurrence of apple if found, and the target will be highlighted.&lt;br /&gt;
&lt;br /&gt;
3. after you got the first apple, you can keep typing&lt;br /&gt;
    n&lt;br /&gt;
to find other apples&lt;br /&gt;
&lt;br /&gt;
===Substituting words===&lt;br /&gt;
First make sure you&#039;re in command mode by pressing ESC.&lt;br /&gt;
* replace first occurrence of old in current line with new&lt;br /&gt;
    :s/old/new/&lt;br /&gt;
&lt;br /&gt;
* replace all occurrence of old in current line with new&lt;br /&gt;
    :s/old/new/g&lt;br /&gt;
&lt;br /&gt;
* replace the first occurrence of old in each line between line n1 and n2 with new&lt;br /&gt;
    :n1,n2s/old/new/&lt;br /&gt;
&lt;br /&gt;
* replace all occurrence of oldbetween line n1 and n2 with new&lt;br /&gt;
    :n1,n2s/old/new/g&lt;br /&gt;
&lt;br /&gt;
* replace all occurrence of old in the whole buffer with new, prompt for confirmation.&lt;br /&gt;
    :1,$s/old/new/gc&lt;br /&gt;
&lt;br /&gt;
* replace all occurrence of old in the whole buffer with new, prompt for confirmation.&lt;br /&gt;
    :%s/old/new/gc&lt;/div&gt;</summary>
		<author><name>Digi</name></author>
	</entry>
</feed>