-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasicGitCommands.txt
More file actions
25 lines (13 loc) · 842 Bytes
/
BasicGitCommands.txt
File metadata and controls
25 lines (13 loc) · 842 Bytes
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
Basic Git Commands :
1. git init --> to initialize the local folder (we tell git that now you should track this folder for any uncoming changes whatsoever)
2. git status --> to check the untracked files
3. git add . --> to add all the files in staging area
4. git add names.txt --> to add only this name file in staging area
5. git commit -m "message" --> to commit the changes that you have made
6. git rm --cached filename --> to unstage the changes after git add .
7. git restore --staged names.txt --> to uncommit the changes after commiting
8. git log --> to see the all commits (History)
9. git reset hashcode --> to unstage the changes till that commit's hashcode
10. git stash --> to make the changes unstage for a while
11. git stash --> to undo the above command
12. git stash clear --> to clear all the unstage changes