<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>So some of you have asked about this so you can build your
interview portfolios. I just tried this and was able to move the
entire Game of Drones (all 27 branches) with all of the
subdirectories to my Github account using the following procedure.</p>
<p>Again -- this is only for moving stuff over for your interview
porfolios. All class-related code development should remain on
Gitlab.</p>
<p>The account names used below are mine on Gitlab and Github (you
should recognize them from class) and I am going to demonstrate
moving the Game of Drones repository. It should be obvious where
you have to substitute your usernames or you own repo names when
you actually want to do this.</p>
<p>Here we go..<br>
</p>
<p>1. Get onto a unix/linux system where you have your Gitlab and
Github ssh keys configured<br>
</p>
2. Change to the /tmp directory and clone the repository using some
additional options<br>
<br>
<pre>cd /tmp</pre>
<pre>git clone --mirror <a class="moz-txt-link-abbreviated" href="mailto:git@gitlab.cs.mercer.edu:pounds-courses/gofd.git">git@gitlab.cs.mercer.edu:pounds-courses/gofd.git</a> gofd</pre>
<br>
-- notice that at the end of the command I also included the name of
the directory. This has to be done with the mirror command so that
it will create the directory without the .git extension. <br>
<br>
3. Log onto Github and create the new repo. <br>
<br>
<img alt="createrepo1" src="cid:part1.CE74BDCB.41AE9039@mercer.edu"
height="866" width="1146"><br>
<br>
<font size="+3">ON THE SECOND PAGE ALL WE NEED IS THE NAME THAT GITHUB
CREATED FOR OUR REPO...<br>
<br>
<img alt="repor2" src="cid:part2.EEFEA55F.C3F1DC04@mercer.edu"
height="935" width="1146"><br>
</font><br>
4. Now that we know github has set aside the name
<a class="moz-txt-link-abbreviated" href="mailto:git@github.com:/drlbs/gofd.git">git@github.com:/drlbs/gofd.git</a> for our repo, we need to point our
current repo to it. Back in your unix command line type<br>
<br>
<pre>cd ./gofd</pre>
<pre>git remote add github <a class="moz-txt-link-abbreviated" href="mailto:git@github.com:drlbs/gofd.git">git@github.com:drlbs/gofd.git</a></pre>
<br>
5. Finally, we need to tell git to push everything to the new remote<br>
<br>
<pre>git push --mirror github
</pre>
<br>
And that should do it. Try it out with your own repositories and
let me know how it goes.<br>
<font size="+3"><br>
</font>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>