-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhistory.txt
143 lines (133 loc) · 5.3 KB
/
history.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
* 7e72706 (HEAD -> master, origin/master) Update history file (Soumya Ray on 2016-10-14)
* 41ad541 Merge pull request #1 from ISS-SOA/tests (Soumya Ray on 2016-10-13)
|\
| | * 6ec4146 (fixtures) Added a links section to data fixture (Soumya Ray on 2016-10-13)
| | * 98c2de0 Added a data fixture (Soumya Ray on 2016-10-13)
| | * 1305754 (tests) Added comment to specs (Soumya Ray on 2016-10-13)
| |/
| * a0bc617 Tested that app main value is true (Soumya Ray on 2016-10-13)
| * 950f1d5 Passed first set of tests (Soumya Ray on 2016-10-13)
|/
* 4fd57fc Add history file to repo (Soumya Ray on 2016-10-11)
* df4cf09 Fixed app.rb to reflect library style code (Soumya Ray on 2016-10-11)
|\
| * a8fce4c (origin/library, library) Create a data file (Soumya Ray on 2016-10-11)
| * 1ec16ac Make a lib folder for business code (Soumya Ray on 2016-10-11)
* | 660a36a Friendlier greeting in app (Soumya Ray on 2016-10-11)
|/
* ebc348b Renamed script to app.rb (Soumya Ray on 2016-10-11)
* f7e5f38 Added script file; added line to README (Soumya Ray on 2016-10-11)
* ab4142b Created a README (Soumya Ray on 2016-10-11)
mkdir soa2016-gitplay
cd soa2016-gitplay/
emacs README.md # created basic file
git init
ls -a # find there is a .git/ folder now!
ls .git/ # peek into .git/ folder (ignore it for now)
git status # see that README.md file is not "staged" for commit
git add README.md # stage README.md for changes
git status
git commit -m "Created a README" # take a snapshot of the folder now
git status
git log # see our history of commits (just one so far)
emacs script.rb # start a new file (not staged by git yet)
git status
git add . # stage script.rb for a commit as well
git status
emacs README.md # modify our README.md
git status # see that our changes to README.md are not staged
git add . # stage changed README.md file
git status
git commit -m "Added script file; added line to README" # snapshot!
git status
git log # see two commits in our history now
git checkout ab4142b # checkout an old commit; view but don't make changes!
ls
cat README.md
git checkout master # come back to reality (our working branch)
mv script.rb app.rb # move our script to give it a new name
emacs README.md # edit our README again
git status # two changed files; one new file (app.rb)
git add . # stage changes
git status
git commit -m "Renamed script to app.rb" # third commit in a row
git log
git status
git branch library # let's start a new direction in our work!
git checkout library # let's change to working in this new direction
mkdir lib # add a new folder and new files
emacs app.rb # modify our app.rb in master branch
emacs lib/name.rb # add a new file
git status
git add .
git status
git commit -m "Make a lib folder for business code" # new commit on library branch!
git status
git log
git checkout master # go back to our master branch
emacs app.rb # edit app.rb on master (we've created a conflict with line 39!)
git status
git add .
git commit -m "Friendlier greeting in app" # conflicting changes committed
git l # secret version of `git log` that you don't have :D
git checkout library # go back to library branch
mkdir data # add a data folder and file
emacs data/names.yml
git add .
git commit -m "Create a data file" # add new data to library branch
git l
git checkout master # go back to our master branch
git merge library # merge work in library back into master --> CONFLICT!
git status
macs app.rb # fix CONFLICT and save
git add app.rb # stage conflicted file
git commit -m "Fixed app.rb to reflect library style code" # commit to finish merge
git l # sit back and enjoy our branching and merging!
history # see this history of commands on unix bash :)
emacs history.txt # create this file by copying in the history
# GITHUB: Create a new repository in Github Organization ISS-SOA; get ssh address
git remote add origin [email protected]:ISS-SOA/soa2016-gitplay.git
git remote --verbose
git push -u origin master # push master branch (and related commits) to Github
git checkout library
git push -u origin library # push library branch to Github
git checkout master
git checkout -b tests # create a new branch (tests) from master
mkdir specs
cd specs
emacs app_spec.rb
git add app_spec.rb
git commit -m "Passed first set of tests"
git push -u origin tests
emacs app_spec.rb
git add app_spec.rb
git commit -m "Tested that app main value is true"
git push
# GITHUB: issue pull request for origin/master (base) from origin/tests (compare)
# GITHUB: delete tests branch on Github
git checkout master
git pull
git l
git branch -d tests # delete local tests branch
git fetch --all --prune # delete local reference to origin/tests
# Change mind: want to make my local tests branch again
git l
git checkout a0bc617
git checkout -b tests
git checkout -b fixtures
cd specs/
mkdir fixtures
cd fixtures/
emacs data.yml
git add .
git commit -m "Added a data fixture"
cd ../fixtures/
emacs data.yml
git add data.yml
git commit -m "Added a links section to data fixture"
git checkout tests
emacs app_spec.rb
git add .
git commit -m "Added comment to specs"
git checkout fixtures
git rebase tests