-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.Tracking git repos.txt
More file actions
60 lines (30 loc) · 1.71 KB
/
2.Tracking git repos.txt
File metadata and controls
60 lines (30 loc) · 1.71 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
53
54
55
56
57
58
59
Tracking the git repository
-------------------------------------------------------------------------------------------------
1.Creating the git repo
----------------------------------------------------------------------------------------------
Navigate to the required folder from git command line using cd command.
-----------------------------------------------------------------------------------------------
Making a git repository for the folder
$ git init
-------------------------------------------------------------------------------------------------
To track all the files in the folder
$ git add --a
--------------------------------------------------------------------------------------------------
For commiting the staged files in the git repo
$ git commit -m "Intial Commit"
----------------------------------------------------------------------------------------------------
For Adding specific file im git
$ git add FILE_NAME
-------------------------------------------------------------------------------------------------------
For Reintialising the git repo
$ git init
------------------------------------------------------------------------------------------------------
For deleting a file in git repo
$ git rm FILE_NAME
-------------------------------------------------------------------------------------------------------
For tracking the changes that we have made until now
$ git log
--------------------------------------------------------------------------------------------------------
Warning:
Never save the file names with spaces between them as git never considers the spaces
It become hectic to remove them as the command never takes the total file name which leads us to fatal error