-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit.sh
executable file
·79 lines (63 loc) · 1.87 KB
/
git.sh
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
#!/bin/sh
## 2012(c) Michael Galyuk, Pandora, freeware
## Init git on your computer
## (Change name and email!)
#git config --global user.name "Michael Galyuk"
#git config --global user.email [email protected]
#git config --global color.ui true
#git config --global core.autocrlf false
#git config --global core.safecrlf true
#git config --global credential.helper cache
#git config credential.helper 'cache --timeout=3600'
## Start new repository
#git init
#git add README.TXT
#git commit -m "first commit"
#git remote rm origin
#git remote add origin https://github.com/Novator/Pandora.git
#git push -u origin master
## Show state
#git status
#git remote -v
#git branch -v
#git diff
## Push files from local to repository
git add --all
git commit -a -m "just a commit"
#git remote add origin https://github.com/Novator/MyScripts.git
git push -u origin master
##Modify last commit
#git commit --amend
## Ignore list. Exclude or remove(!) files
#nano .gitignore
#git rm --cached rubyfull.exe
#git rm rubyfull.exe
## Rename file or directory
#git mv ruby.exe rubyfull.exe
## Getting repository to local without history
#git clone --depth=1 https://github.com/Novator/Pandora.git
## Getting changes from repository to local (with or without merge)
#git pull
#git fetch
## Merge pull from another brunch
#git pull https://github.com/rc5hack/Pandora master
##See number of commits, merge commits and update repository
##(set number of commits after "HEAD~", modify "pick" to "s" in all lines besides first)
#git reflog
#git rebase -i HEAD~4
#git push -f
##Pack git objects
#git gc
##Create branch, move to it, or both
#git branch testing
#git checkout testing
#git checkout -b 'testing'
##Merge branch, see conflits, add corrects, and delete unused branch
#git checkout master
#git merge testing
#git status
#git add pandora.rb
#git commit
#git branch --merged
#git branch --no-merged
#git branch -d testing