-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes on getting started, pull requests process, git diff options, da…
…ta viz. Drop Asana; push VSCode. (#4)
- Loading branch information
Showing
9 changed files
with
278 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
If you just joined our team, welcome. | ||
A few suggestions about getting started: | ||
\begin{itemize} | ||
\item | ||
Be prepared to get stumped and make mistakes. | ||
Ask the coauthors and RAs for help. | ||
We've all been there. | ||
Do not struggle alone in silence. | ||
\item | ||
An existing project is a trove of material demonstrating how we work in practice. | ||
Ask a coauthor to add you to a repository so that you can read through others' pull request reviews. | ||
\item | ||
Some RAs think mastering command-line Git is better than using a GUI app: | ||
``using the command line for Git forces you to know and understand the Git commands you issue.'' | ||
\item | ||
An existing project is a trove of material demonstrating how we work in practice. | ||
Read existing Makefiles to learn how Make works. | ||
\item | ||
ChatGPT is very good at both explaining shell scripts and composing new ones based on precise instructions. | ||
ChatGPT is a tool that you should leverage. | ||
You are responsible for your outputs. | ||
\item | ||
Try to apply our computing tools and workflow to research substance that you've already mastered. | ||
Were you an RA? Did you write a thesis? | ||
Take that data and code and get it on GitHub, take your Word document and write it in \LaTeX, write a Makefile to replace your \texttt{master.R}, and so forth. | ||
\item | ||
We hope that one of your first assigned tasks will be ``refactoring'' code (improving code without creating new functionality). | ||
Because the existing code already has valid inputs and outputs, | ||
this assignment will provide a complete description of the pre-requisites and a clear benchmark by which your work will be evaluated. | ||
Look for the ``refactoring/rewriting'' label on GitHub issues. | ||
\item | ||
We don't do \href{https://en.wikipedia.org/wiki/Pair_programming}{pair programming}, | ||
but you should aim to work on code live in front of other team members during your early weeks. | ||
They'll notice shortcuts and tools you're failing to deploy as you work. | ||
\end{itemize} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ \subsection{Version control in a single-machine environment} | |
\item \texttt{git commit} commits a set of changes | ||
\item \texttt{git log} lists the history of commits | ||
\end{itemize} | ||
See ``\href{https://git-scm.com/book/en/v1/Git-Basics}{Git Basics}'' on these. | ||
See ``\href{https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository}{Git Basics}'' on these. | ||
|
||
A couple more resources: | ||
\begin{itemize} | ||
|
@@ -132,3 +132,55 @@ \subsubsection{Undoing changes} | |
To do that, use \texttt{git reset --soft HEAD\texttt{$\sim$}1}. | ||
This command will remove the last commit from the current branch and keep previously commited files in the staged area. | ||
For a more detailed description, see \href{https://www.atlassian.com/git/tutorials/undoing-changes/git-reset}{Atlassian guide}. | ||
|
||
\subsubsection{More notes on \texttt{git diff}} | ||
The options \texttt{--name-only}, \texttt{--name-status}, and \texttt{--compact-summary} are quite helpful. | ||
|
||
\texttt{git diff --name-only} shows only which files have changed, not the changed contents. | ||
\begin{lstlisting}[language=bash] | ||
jdingel$ git diff HEAD --name-only | ||
logbook/entries/gettingstarted.tex | ||
logbook/entries/git_alone.tex | ||
logbook/entries/git_together.tex | ||
logbook/entries/researchinfrastructure.tex | ||
logbook/logbook.tex | ||
\end{lstlisting} | ||
|
||
\texttt{git diff --name-status} shows whether files are added (A), modified (M), deleted (D), or renamed (R). | ||
This branch has added \texttt{gettingstarted.tex} and renamed \texttt{asana.tex} to \texttt{taskassignments.tex}. | ||
\begin{lstlisting}[language=bash] | ||
jdingel$ git diff origin/master --name-status | ||
M logbook/entries/codereview.tex | ||
A logbook/entries/gettingstarted.tex | ||
M logbook/entries/git_alone.tex | ||
M logbook/entries/git_together.tex | ||
M logbook/entries/researchinfrastructure.tex | ||
M logbook/entries/statanotes.tex | ||
R077 logbook/entries/asana.tex logbook/entries/taskassignments.tex | ||
M logbook/entries/visualization.tex | ||
M logbook/logbook.tex | ||
\end{lstlisting} | ||
|
||
\texttt{git diff --compact-summary} shows you how much files have changed. | ||
When I added the first page of this logbook to the \texttt{README.md} file, | ||
85 lines of that file changed, but there were minor edits to four other files too. | ||
\begin{lstlisting}[language=bash] | ||
jdingel$ git log d3bc9642 | head | ||
commit d3bc96426aa929b39281816ec0fbfcbbdac104ee | ||
Author: JDingel <[email protected]> | ||
Date: Wed Mar 22 22:57:26 2023 -0500 | ||
|
||
Adds the first page of to README.md | ||
|
||
commit 4ba5370eaf7b59e0dd29b0bbfefa8910d6c1250c | ||
Author: Jonathan Dingel <[email protected]> | ||
Date: Thu Jun 2 18:57:37 2022 -0500 | ||
|
||
jdingel$ git diff 4ba5370eaf7b5 d3bc9642 --compact-summary | ||
Makefile (new) | 7 +++++ | ||
README.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++- | ||
header.md (new) | 11 +++++++ | ||
logbook/entries/researchinfrastructure.tex | 2 +- | ||
logbook/entries/tasks.tex | 2 +- | ||
5 files changed, 104 insertions(+), 3 deletions(-) | ||
\end{lstlisting} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.