@@ -32,52 +32,46 @@ Once the git is installed, set the user email address and the user name
32
32
Git allows you define your own aliases to make your life easier
33
33
34
34
### Bare minimum aliases
35
- git config --global alias.a 'add -A'
36
- git config --global alias.b 'branch'
37
- git config --global alias.c 'checkout'
38
- git config --global alias.cb 'checkout -b'
39
- git config --global alias.pr 'pull --rebase'
40
- git config --global alias.pom 'push origin master'
41
- git config --global alias.rc 'rebase --continue'
42
- git config --global alias.ra 'rebase --abort'
43
- git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
44
- git config --global alias.lga "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"
45
- git config --global alias.aliases "config --get-regexp alias"
35
+ * git config --global alias.a 'add -A'
36
+ * git config --global alias.b 'branch'
37
+ * git config --global alias.c 'checkout'
38
+ * git config --global alias.cb 'checkout -b'
39
+ * git config --global alias.pr 'pull --rebase'
40
+ * git config --global alias.pom 'push origin master'
41
+ * git config --global alias.rc 'rebase --continue'
42
+ * git config --global alias.ra 'rebase --abort'
43
+ * git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
44
+ * git config --global alias.lga "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"
45
+ * git config --global alias.aliases "config --get-regexp alias"
46
46
47
47
#### Colorization
48
- git config --global color.branch "auto"
49
- git config --global color.diff "auto"
50
- git config --global color.status "auto"
51
- git config --global color.branch.current "yellow reverse"
52
- git config --global color.branch.local "yellow"
53
- git config --global color.branch.remote "green"
54
- git config --global color.diff.meta "yellow bold"
55
- git config --global color.diff.frag "magenta bold"
56
- git config --global color.diff.old "red bold"
57
- git config --global color.diff.new "green bold"
58
- git config --global color.status.added "yellow"
59
- git config --global color.status.changed "green"
60
- git config --global color.status.untracked "cyan"
48
+ * git config --global color.branch "auto"
49
+ * git config --global color.diff "auto"
50
+ * git config --global color.status "auto"
51
+ * git config --global color.branch.current "yellow reverse"
52
+ * git config --global color.branch.local "yellow"
53
+ * git config --global color.branch.remote "green"
54
+ * git config --global color.diff.meta "yellow bold"
55
+ * git config --global color.diff.frag "magenta bold"
56
+ * git config --global color.diff.old "red bold"
57
+ * git config --global color.diff.new "green bold"
58
+ * git config --global color.status.added "yellow"
59
+ * git config --global color.status.changed "green"
60
+ * git config --global color.status.untracked "cyan"
61
61
62
62
63
63
64
64
### Creating a new repository
65
65
66
66
Create a new directory, go to teh newly created directory and do git init.
67
67
68
- $ mkdir demo
69
- $ cd demo/
70
- $ git init
71
- Initialized empty Git repository in c:/source/demo/.git/
68
+ * $ mkdir demo
69
+ * $ cd demo/
70
+ * $ git init
71
+ * Initialized empty Git repository in c:/source/demo/.git/
72
72
73
73
This will create a local master and all your current will be in the 'master'
74
74
75
- Now to add a file to the repository
76
-
77
- - Create a file
78
- - Add it to index (git add .)
79
- - To check the status of the files under your repository (git status)
80
- - commit the files to the local repository (git commit -m <comment >)
81
75
82
76
### Working with branches
83
77
@@ -86,11 +80,19 @@ Recommendation is that any work should be carried out in a different branch (for
86
80
87
81
Creating a branch automatically switches the working branch to the new created branch (-b option creates a new branch)
88
82
89
- $ git checkout -b working
90
- Switched to a new branch 'working'
83
+ * $ git checkout -b working
84
+ * Switched to a new branch 'working'
85
+
86
+ Now to add a file to the repository
87
+
88
+ * Create a file
89
+ * Add it to index (git add .)
90
+ * To check the status of the files under your repository (git status).
91
+ * Commit the file(s) to the local repository (git commit -m <comment >)
91
92
92
93
## Clone a repository
93
94
95
+
94
96
### WorkFlow
95
97
96
98
Local repository
@@ -109,11 +111,6 @@ Get help with Git
109
111
```
110
112
git help
111
113
```
112
- ### Working Locally
113
- Start git at a folder
114
- ```
115
- git init
116
- ```
117
114
118
115
### Working with Remote Repos
119
116
0 commit comments