-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitinfo.sh
executable file
·78 lines (65 loc) · 2.4 KB
/
gitinfo.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/bash
#
##################################################################################################################
# Written to be used on 64 bits computers
# Author : DarkXero
# Website : http://xerolinux.github.io
##################################################################################################################
# Problem solving commands
# Read before using it.
# https://www.atlassian.com/git/tutorials/undoing-changes/git-reset
# git reset --hard orgin/master
# ONLY if you are very sure and no coworkers are on your github.
# Command that have helped in the past
# Force git to overwrite local files on pull - no merge
# git fetch all
# git push --set-upstream origin master
# git reset --hard orgin/master
#setting up git
#https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config
echo
tput setaf 1
echo "################################################################"
echo "##### Choose wisely - one time setup after clean install ####"
echo "################################################################"
tput sgr0
echo
echo "Select the correct user"
echo
echo "0. Nada"
echo "1. GitHub"
echo
echo "Type the number..."
echo
read CHOICE
case $CHOICE in
0 )
echo
echo "########################################"
echo "We did nothing as per your request"
echo "########################################"
echo
;;
1 )
git config --global pull.rebase false
git config --global push.default simple
git config --global user.name "DarkXero-dev"
git config --global user.email "[email protected]"
sudo git config --system core.editor nano
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000'
;;
* )
echo "#################################"
echo "Choose the correct number"
echo "#################################"
;;
esac
echo "###########################################################"
echo "Github credentials have been set"
echo "Delete the ~/.cache/git folder if you made a mistake or"
echo "if you want to switch to your personal github"
echo "###########################################################"
echo "################################################################"
echo "################### T H E E N D ######################"
echo "################################################################"