Skip to content

Commit 14f9ebc

Browse files
committed
docs: Adds a section on forking and pull requests
Closes #5
1 parent e79c28f commit 14f9ebc

7 files changed

+32
-20
lines changed

Git Tutorial.aux

+2
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@
7272
\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}ReadMe}{21}{subsection.9.1}\protected@file@percent }
7373
\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}Creating Releases}{22}{subsection.9.2}\protected@file@percent }
7474
\@writefile{toc}{\contentsline {subsection}{\numberline {9.3}Creating Issues}{22}{subsection.9.3}\protected@file@percent }
75+
\@writefile{toc}{\contentsline {subsection}{\numberline {9.4}Forking}{23}{subsection.9.4}\protected@file@percent }
76+
\@writefile{toc}{\contentsline {subsection}{\numberline {9.5}Pull Requests}{23}{subsection.9.5}\protected@file@percent }
7577
\@writefile{toc}{\contentsline {section}{\numberline {10}Conclusion}{23}{section.10}\protected@file@percent }
7678
\gdef \@abspage@last{23}

Git Tutorial.log

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.8) (preloaded format=pdflatex 2021.10.5) 26 OCT 2021 11:02
1+
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.8) (preloaded format=pdflatex 2021.10.5) 26 OCT 2021 11:15
22
entering extended mode
33
**"./Git Tutorial.tex"
44
(Git Tutorial.tex
@@ -422,7 +422,7 @@ LaTeX Font Info: External font `cmex10' loaded for size
422422

423423
[2]
424424
(Images/repositories.pdf_tex
425-
<Images//repositories.pdf, id=296, page=1, 673.41853pt x 670.94444pt>
425+
<Images//repositories.pdf, id=306, page=1, 673.41853pt x 670.94444pt>
426426
File: Images//repositories.pdf Graphic file (type pdf)
427427
<use Images//repositories.pdf, page 1>
428428
Package pdftex.def Info: Images//repositories.pdf , page1 used on input line 56
@@ -434,20 +434,20 @@ LaTeX Font Info: External font `cmex10' loaded for size
434434
(Font) <20.74> on input line 57.
435435
LaTeX Font Info: External font `cmex10' loaded for size
436436
(Font) <17.28> on input line 57.
437-
<Images//repositories.pdf, id=297, page=2, 673.41853pt x 670.94444pt>
437+
<Images//repositories.pdf, id=307, page=2, 673.41853pt x 670.94444pt>
438438
File: Images//repositories.pdf Graphic file (type pdf)
439439
<use Images//repositories.pdf, page 2>
440440
Package pdftex.def Info: Images//repositories.pdf , page2 used on input line 59
441441
.
442442
(pdftex.def) Requested size: 469.75499pt x 468.03009pt.
443443
) (Images/commit-history.pdf_tex
444-
<Images//commit-history.pdf, id=298, page=1, 887.13869pt x 304.73422pt>
444+
<Images//commit-history.pdf, id=308, page=1, 887.13869pt x 304.73422pt>
445445
File: Images//commit-history.pdf Graphic file (type pdf)
446446
<use Images//commit-history.pdf, page 1>
447447
Package pdftex.def Info: Images//commit-history.pdf , page1 used on input line
448448
56.
449449
(pdftex.def) Requested size: 469.75499pt x 161.35957pt.
450-
<Images//commit-history.pdf, id=299, page=2, 887.13869pt x 304.73422pt>
450+
<Images//commit-history.pdf, id=309, page=2, 887.13869pt x 304.73422pt>
451451
File: Images//commit-history.pdf Graphic file (type pdf)
452452
<use Images//commit-history.pdf, page 2>
453453
Package pdftex.def Info: Images//commit-history.pdf , page2 used on input line
@@ -458,7 +458,7 @@ Package pdftex.def Info: Images//commit-history.pdf , page2 used on input line
458458
pdfTeX warning: pdflatex (file ./Images//repositories.pdf): PDF inclusion: mult
459459
iple pdfs with page group included in a single page
460460
>] (Images/remote-repos.pdf_tex
461-
<Images//remote-repos.pdf, id=306, page=1, 649.18867pt x 894.94525pt>
461+
<Images//remote-repos.pdf, id=316, page=1, 649.18867pt x 894.94525pt>
462462
File: Images//remote-repos.pdf Graphic file (type pdf)
463463
<use Images//remote-repos.pdf, page 1>
464464
Package pdftex.def Info: Images//remote-repos.pdf , page1 used on input line 56
@@ -473,28 +473,28 @@ ltiple pdfs with page group included in a single page
473473
pdfTeX warning: pdflatex (file ./Images//remote-repos.pdf): PDF inclusion: mult
474474
iple pdfs with page group included in a single page
475475
>] [5] [6] [7] [8] [9]
476-
<Images//GPG Key Listing.png, id=423, 507.0945pt x 151.16475pt>
476+
<Images//GPG Key Listing.png, id=433, 507.0945pt x 151.16475pt>
477477
File: Images//GPG Key Listing.png Graphic file (type png)
478478
<use Images//GPG Key Listing.png>
479479
Package pdftex.def Info: Images//GPG Key Listing.png used on input line 240.
480480
(pdftex.def) Requested size: 253.54662pt x 75.58218pt.
481481
[10 <./Images//GPG Key Listing.png>] [11] [12] [13]
482482
[14] [15] [16] [17]
483-
<Images//Git Tree.png, id=499, 196.93575pt x 274.02374pt>
483+
<Images//Git Tree.png, id=509, 196.93575pt x 274.02374pt>
484484
File: Images//Git Tree.png Graphic file (type png)
485485
<use Images//Git Tree.png>
486486
Package pdftex.def Info: Images//Git Tree.png used on input line 427.
487-
(pdftex.def) Requested size: 177.24051pt x 246.61908pt.
487+
(pdftex.def) Requested size: 167.39615pt x 232.92128pt.
488488
[18] [19 <./Images//Git Tree.png>] [20] [21] [22] [23]
489489
(Git Tutorial.aux)
490490
Package rerunfilecheck Info: File `"Git Tutorial".out' has not changed.
491-
(rerunfilecheck) Checksum: 199E3B9C4485FDE2824F2BF9179E1473;9365.
491+
(rerunfilecheck) Checksum: 01BD6D6B68EB13B63CAB664E70690B9A;9584.
492492
)
493493
Here is how much of TeX's memory you used:
494-
10379 strings out of 478868
495-
157149 string characters out of 2848809
494+
10383 strings out of 478868
495+
157209 string characters out of 2848809
496496
483002 words of memory out of 3000000
497-
27959 multiletter control sequences out of 15000+600000
497+
27961 multiletter control sequences out of 15000+600000
498498
411779 words of font info for 54 fonts, out of 8000000 for 9000
499499
1141 hyphenation exceptions out of 8191
500500
62i,15n,75p,1859b,514s stack positions out of 5000i,500n,10000p,200000b,80000s
@@ -507,9 +507,9 @@ amsfonts/cm/cmbx12.pfb><C:/Users/nblch/AppData/Local/Programs/MiKTeX/fonts/type
507507
ms/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/Users/nblch/AppData/Loca
508508
l/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr17.pfb><C:/Users/nblch/AppD
509509
ata/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
510-
Output written on "Git Tutorial.pdf" (23 pages, 298663 bytes).
510+
Output written on "Git Tutorial.pdf" (23 pages, 301463 bytes).
511511
PDF statistics:
512-
602 PDF objects out of 1000 (max. 8388607)
513-
173 named destinations out of 1000 (max. 500000)
514-
484 words of extra memory for PDF output out of 10000 (max. 10000000)
512+
613 PDF objects out of 1000 (max. 8388607)
513+
175 named destinations out of 1000 (max. 500000)
514+
500 words of extra memory for PDF output out of 10000 (max. 10000000)
515515

Git Tutorial.out

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@
5353
\BOOKMARK [2][-]{subsection.9.1}{\376\377\000R\000e\000a\000d\000M\000e}{section.9}% 53
5454
\BOOKMARK [2][-]{subsection.9.2}{\376\377\000C\000r\000e\000a\000t\000i\000n\000g\000\040\000R\000e\000l\000e\000a\000s\000e\000s}{section.9}% 54
5555
\BOOKMARK [2][-]{subsection.9.3}{\376\377\000C\000r\000e\000a\000t\000i\000n\000g\000\040\000I\000s\000s\000u\000e\000s}{section.9}% 55
56-
\BOOKMARK [1][-]{section.10}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 56
56+
\BOOKMARK [2][-]{subsection.9.4}{\376\377\000F\000o\000r\000k\000i\000n\000g}{section.9}% 56
57+
\BOOKMARK [2][-]{subsection.9.5}{\376\377\000P\000u\000l\000l\000\040\000R\000e\000q\000u\000e\000s\000t\000s}{section.9}% 57
58+
\BOOKMARK [1][-]{section.10}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 58

Git Tutorial.pdf

2.73 KB
Binary file not shown.

Git Tutorial.synctex.gz

6.55 KB
Binary file not shown.

Git Tutorial.tex

+8-2
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@
424424

425425
\begin{figure}[ht]
426426
\centering
427-
\includegraphics[scale=0.9]{Git Tree}
427+
\includegraphics[scale=0.85]{Git Tree}
428428
\end{figure}
429429

430430
\subsection{Combining Commits}
@@ -502,7 +502,13 @@
502502
\subsection{Creating Issues}
503503
Issues are a great way to track any of the problems or improvements you want to make in your code. You can also assign jobs to others in the lab by assigning them issues. If you want to close an issue, you can do this manually in github, or you can close it with a commit message by following \href{https://docs.github.com/en/enterprise/2.16/user/github/managing-your-work-on-github/closing-issues-using-keywords#closing-multiple-issues}{these instructions}.
504504

505-
Documenting your bugs, features you want to add, and any future changes that need to be made is necessary for a few reasons. The main one is that it helps regulatory bodies like the FDA or the IRB know exactly when and how we found and solved problems in our code and how we did our due diligence in making sure we have safe code. Documenting issues also helps you keep your thoughts in order and your can even organize your issues into groups using projects on Github. I usually make a project for improving test code and another for analysis code. Projects also allow for automation in making issues into categories like to-do, in progress, done, and wont fix. Finally, making issues allows you to organize a team of people fixing code by allowing you to assign jobs to people and setting milestones in github.
505+
Documenting your bugs, features you want to add, and any future changes that need to be made is necessary for a few reasons. The main one is that it helps regulatory bodies like the FDA or the IRB know exactly when and how we found and solved problems in our code and how we did our due diligence in making sure we have safe code. Documenting issues also helps you keep your thoughts in order and your can even organize your issues into groups using projects on Github. I usually make a project for improving test code and another for analysis code. Projects also allow for automation in making issues into categories like to-do, in progress, done, and wont fix. Finally, making issues allows you to organize a team of people fixing code by allowing you to assign jobs to people and setting milestones in GitHub.
506+
507+
\subsection{Forking}
508+
On GitHub, there is an option at the top labeled as fork. You can do this on any public or private repository that you have access to and it will create a copy of the repository in my personal profile. The benefit of this is you can make large changes to this copy of the repository without affecting the original. If you want to then add some or all of those changes to the original, you can submit a pull request, which I will talk about next. Be careful when making forks. This is not a way for you to make multiple copies of the same code as this defeats the purpose of version controlling. There may be better options depending on your situation like branching to add a feature or using submodules when you want the same support scripts in multiple repositories. The only real time to fork is if its a repository outside of the lab or you want to create a whole new experiment where you will be changing the code to the point where it would no longer work for its original purpose.
509+
510+
\subsection{Pull Requests}
511+
The final information you need to know about GitHub is they have a feature called pull requests. This is something we would have to turn on for repositories and the main purpose of them is so that a senior person can verify code. It works similarly to an issue, but is usually done when merging a branch to the main code. It will signal a senior person and ask them to review the code before approving the pull request. As of writing this, the Tyler lab does not do pull requests as we are a small team that can self manage our code well enough, but as we get bigger and want to collaborate, we will want to enable pull requests on code we share to make sure we only accept code we want integrated into our repositories. Pull requests will generally by done directly on GitHub, but we can also make settings that make pull requests under certain conditions when people push code.
506512

507513
\section{Conclusion}
508514
The most important thing for you to do is keep the central repository of code on GitHub up-to-date. We all use each other’s code so we need to know that what is on GitHub is experiment ready. Clear documentation is also important. I shouldn't need to ask you what something does or why you did something. The changes should be documented well in commit messages and your code should have enough comments for me to read it clearly. Add things to the ReadMe if you think it will make the usage of your code clearer.

Git Tutorial.toc

+2
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@
5353
\contentsline {subsection}{\numberline {9.1}ReadMe}{21}{subsection.9.1}%
5454
\contentsline {subsection}{\numberline {9.2}Creating Releases}{22}{subsection.9.2}%
5555
\contentsline {subsection}{\numberline {9.3}Creating Issues}{22}{subsection.9.3}%
56+
\contentsline {subsection}{\numberline {9.4}Forking}{23}{subsection.9.4}%
57+
\contentsline {subsection}{\numberline {9.5}Pull Requests}{23}{subsection.9.5}%
5658
\contentsline {section}{\numberline {10}Conclusion}{23}{section.10}%

0 commit comments

Comments
 (0)