-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGit-complete-installation
108 lines (54 loc) · 1.51 KB
/
Git-complete-installation
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
install git
sudo apt get install git -y
check git version
git --version
setup github account
create repo in github after signup
got to terminal
congfigure your username and email (used in github account)
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
verify
git config --list
list all files in git
ls -al
check the file .gitconfig
gedit .gitconfig
create a directory in your home directory
pwd
mkdir Git-workspace
select the directory
cd Git-workspace
clone the repos you created in your github account
git clone repo url
it will ask for username and pass if the repo is private
if the repo is private then you have to generate access token and use it as password
run command
ls
cd repo name
create a file
touch bee.txt
run commnad
ls
run command
gedit bee.txt
write any text
save it and close the file
noe run coommand
git status
it will show the file that is not staged
run command
git add bee.txt
the file will be added to staged environment
run command to verify
git status
commit the file
run command
git commit bee.txt
add the remote repo before pushing the file
git add remote origin (repo url)
or
run command to verify the remote repos
git remote -v
if the repo is not there then
Run the git remote set-url --add --push origin git-repository-name command where git-repository-name is the URL and name of the Git repository where you want to host your code. This changes the push destination of origin to that Git repository.