Command Line/Git & Version Control/Markdown/

Linda Wang

April 2023

Command Line/Git & Version Control/Markdown/

Command Line

This slide is based on the Carpentries tutorial on the Unix shell (which you might want to do on your own).

Commands in the Unix Shell

$ ls
$ pwd
$ mkdir somepath
$ cd somepath 
$ pwd
$ cd ..
$ cd ./somepath
$ pwd
$ mv somepath otherpath
$ cp test.do otherpath/
$ rm filename.do

Git

Version Control system. Track the progress in a project: what changes?, who made changes? Again see the Carpentries tutorial

Git and the command line

git clone https://github.com/labordynamicsinstitute/prettygood-example

(don’t forget to change directory)

git status
git pull
git add otherpath/fileimodified.do
git add otherpath/fileicreated.do
git commit -m "you write here a commit message"
git push

Markdown

We use Markdowns to write reports. why?

Basic Syntax(https://www.markdownguide.org/basic-syntax/)

Headings

# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
##### Heading level 5

Heading level 1
===============

Heading level 2
---------------

Lists

Ordered lists
1. First item
2. Second item
3. Third item
    1. Indented item
    2. Indented item
4. Fourth item 

Unordered lists
- First item
- Second item
- Third item
    - Indented item
    - Indented item
- Fourth item 

Blockquotes and Code Blocks

This is a block quote, and it is created like this

> This is a block quote, and it is created like this

Code embedded in the document:

 "```"
 gen var1= var2/var3
 
 "```" 

Spacing

### Bad example
#### U.S.Census Population Division
- Retrieved from https://www.census.gov/geographies/reference-files/2017/demo/popest/2017-fips.html
### Good example
#### U.S.Census Population Division

- Retrieved from https://www.census.gov/geographies/reference-files/2017/demo/popest/2017-fips.html
Bad example:
Thank you for your replication archive.Blablabla.
**Conditional on making the requested changes to the manuscript and the openICPSR deposit prior to publication, the replication package is accepted.**
Good example:

Thank you for your replication archive. Blablabla.

**Conditional on making the requested changes to the manuscript and the openICPSR deposit prior to publication, the replication package is accepted.**