forked from Ziyan1/M1UPS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_config
More file actions
52 lines (38 loc) · 1.17 KB
/
git_config
File metadata and controls
52 lines (38 loc) · 1.17 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/usr/bin/subl sublime
alias gcc = 'gcc -Wall -ansi -pedantic -Werror'
# pacman -Syu : Upgrading packages
# pacman -Rs package_name : Removing packages
# pacman -S package_name1 package_name2 ... : Installing packages *
Create a new repository on the command line
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/username/Licence3.git
git push -u origin master
Push an existing repository from the command line
git remote add origin https://github.com/username/Licence3.git
git push -u origin master
Clone an existing repository from the command line
git clone git://github.com/schacon/grit.git mongrit
Update local repository
git pull origin master
Status
git status
Cancel last commit
git commit --amend
Remove file
git rm
move file
git mv
Configuration
git config --global user.name "username"
git config --global user.email "email"
git config --global credential.helper 'cache --timeout=3600'
alias of git
git config --global alias.ce checkout
git config --global alias.br branch
git config --global alias.co commit
git config --global alias.st status
//the last commit
git config --global alias.last 'log -1 HEAD'