generated from carpentries/workshop-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday3.txt
109 lines (84 loc) · 2.38 KB
/
day3.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# cool examples from cool people @ MPI-EVA
# https://github.com/HedvigS/Oceanic_computational_ASR
# https://github.com/paleobiotechnology/analysis-project-structure
# https://github.com/babeheim/moralizing-gods-reanalysis
# https://github.com/fhillemann/harvest
# https://github.com/LEK85
# commands to navigate the file system
pwd
ls
cd ~/Desktop
# configuation settings (typically only need to set these once)
git config --global user.name "Bret Beheim"
git config --global user.email "[email protected]"
git config --global core.editor "nano -w"
git config --list
git config --global core.autocrlf input # for mac/linux
git config --global core.autocrlf true # for windows
# working with the day3 example folder
git init
git status
git add "analysis clean.R"
git add "data processing script.R"
git commit
git log
git log --oneline
git ls-tree
git ls-tree -r master
git add analysis.R
git status
git add "analysis clean.R"
git status
git add "data processing script.R"
git status
git add "data_processing_script.R"
git status
git commit -m "renamed two files"
git log
git status
git add .gitignore
git commit -m "added a gitignore file"
git status
git add analysis.R
git status
git diff analysis.R
git commit -m "removed a few lines of code from analysis.R"
git status
git diff analysis.R
git log --oneline
git log analysis.R
# checking out files from past commits
git checkout d5c8e1f # this is not a good command, will check out the entire folder and create a "detached head"
git checkout master # how to get back to the master branch
git log
git checkout d5c8e1f analysis.R # how to check out one specific file
git status
git checkout 98d6cf3 analysis.R
git checkout 98d6cf3 "analysis clean.R"
git log analysis.R
git diff d5c8e1f 4265e85 analysis.R
git log analysis.R
git status
git add "analysis clean.R"
git add "analysis_data.tsv"
git add analysis.R
git add data_processing_script.R
git status
git add 1_data_processing_script.R
git add 2_analysis.R
git status
git add 01_data_processing_script.R
git add 02_analysis.R
git status
git add 1_data_processing_script.R
git add 2_analysis.R
git status
git add README.txt
git commit -m "updated file names for clarity"
git log
git status
git remote add origin https://github.com/babeheim/bret-swc-example-2023.git
git status
git pull origin main
# the resulting cleaned-up version of the workflow:
# https://github.com/babeheim/bret-swc-example-2023