-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotesLesson2.txt
More file actions
37 lines (30 loc) · 1.19 KB
/
Copy pathnotesLesson2.txt
File metadata and controls
37 lines (30 loc) · 1.19 KB
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
command: git init
creates new git repositry but does not create
any commits so its a git repositry with no files
command: git add f1.txt
adds files to staging area - these files are the
chosen files to be committed to the repositry
command: git status
tells us files in the stagin area and files that
will not be committed.
commands: git diff, git diff --staged, git diff f1 f2
(i) shows differences between cwd and stage area
(ii) shows differences between staged file and latest
commit files
(iii) orig meaning
commands: git branch, git branch b1
(i) tells us which branch we are currently in and the
branches available
(ii) takes us to branch b1
branches are useful when trying to add new big features
which might change lots of things int eh code - but
you want to keep a clean code too
visualisation of branches is useful to see whats happened
in the past
merging two branches means that if you have been working
on a new feature and someone else has been working on
another feature then you can merge the two different codes
together in a easy way to create a new master branch with a
new commit HEAD
automatic merging is quick but should be done with oversight
to make sure conflicts are resolved