Skip to content

Commit 5b7c597

Browse files
author
Emelda
committed
More details
1 parent d6607e6 commit 5b7c597

File tree

1 file changed

+38
-41
lines changed

1 file changed

+38
-41
lines changed

handout.md

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,52 +32,46 @@ Once the git is installed, set the user email address and the user name
3232
Git allows you define your own aliases to make your life easier
3333

3434
### 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"
4646

4747
#### 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"
6161

6262

6363

6464
### Creating a new repository
6565

6666
Create a new directory, go to teh newly created directory and do git init.
6767

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/
7272

7373
This will create a local master and all your current will be in the 'master'
7474

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>)
8175

8276
### Working with branches
8377

@@ -86,11 +80,19 @@ Recommendation is that any work should be carried out in a different branch (for
8680

8781
Creating a branch automatically switches the working branch to the new created branch (-b option creates a new branch)
8882

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>)
9192

9293
## Clone a repository
9394

95+
9496
### WorkFlow
9597

9698
Local repository
@@ -109,11 +111,6 @@ Get help with Git
109111
```
110112
git help
111113
```
112-
### Working Locally
113-
Start git at a folder
114-
```
115-
git init
116-
```
117114

118115
### Working with Remote Repos
119116

0 commit comments

Comments
 (0)